2

In the HTTP protocol the URI is used to identify a resource, and a query-string indicates extra parameters that, according to msdn

The Web server can use those parameters to do extra stuff before returning the resource to the user.

My question is from an HTTP intermediary viewpoint, does two similar URI, that only differentiate in the query string, identify two different resources?

RuiDTLima
  • 35
  • 1
  • 9

1 Answers1

0

HTTP URIs that differ in the query component are not equivalent (unless the only difference is the percent-encoding of unreserved characters). They could still identify the same resource, but this is not relevant for deciding whether they are equivalent in the eyes of the URI standard.

The URI standard (STD 66; currently: RFC 3986), explains how to check if URIs are equivalent:
Normalization and Comparison.

Examples

These URIs are equivalent:

http://example.com/foo?bar
http://example.com/foo?ba%72
http://example.com:80/foo?bar

These URIs aren’t equivalent:

http://example.com/foo?bar
http://example.com/foo?baz

And neither are these equivalent (details):

http://example.com/foo
http://example.com/foo?
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360