【发布时间】:2011-12-22 06:38:50
【问题描述】:
是否可以在 HTTP Set-Cookie 请求中的“路径”参数前面放置通配符?
示例:
Set-Cookie: SSID=foo; Domain=.foo.com; Path=/*/Stuff; Secure; HttpOnly
【问题讨论】:
-
我希望这是可能的
是否可以在 HTTP Set-Cookie 请求中的“路径”参数前面放置通配符?
示例:
Set-Cookie: SSID=foo; Domain=.foo.com; Path=/*/Stuff; Secure; HttpOnly
【问题讨论】:
查看RFC 6265 HTTP State Management Mechanism, 5.1.4. Paths and Path-Match:
A request-path path-matches a given cookie-path if at least one of
the following conditions holds:
o The cookie-path and the request-path are identical.
o The cookie-path is a prefix of the request-path, and the last
character of the cookie-path is %x2F ("/").
o The cookie-path is a prefix of the request-path, and the first
character of the request-path that is not included in the cookie-
path is a %x2F ("/") character.
它没有提到任何通配符处理,因此不可能在路径中使用通配符。
【讨论】: