用于标识资源的查询字符串

Query String to identify a resource

在 HTTP 协议中,URI 用于标识资源,查询字符串表示额外的参数,根据 msdn

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

我的问题是从 HTTP 中介的角度来看,两个相似的 URI,仅在查询字符串中有所区别,是否标识两个不同的资源?

在查询组件中不同的 HTTP URI 并不等同(除非唯一的区别是 )。它们仍然可以识别相同的资源,但这与确定它们在 URI 标准眼中是否等同无关。

URI 标准 (STD 66; currently: RFC 3986),解释了如何检查 URI 是否等同:
Normalization and Comparison.

例子

这些 URI 是等价的:

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

这些 URI 不等同:

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

而且这些都不等价 ():

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