【问题标题】:Set-Cookie: Wildcard "Path"Set-Cookie:通配符“路径”
【发布时间】:2011-12-22 06:38:50
【问题描述】:

是否可以在 HTTP Set-Cookie 请求中的“路径”参数前面放置通配符?

示例:

Set-Cookie: SSID=foo; Domain=.foo.com; Path=/*/Stuff; Secure; HttpOnly

【问题讨论】:

  • 我希望这是可能的

标签: http cookies


【解决方案1】:

查看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.

它没有提到任何通配符处理,因此不可能在路径中使用通配符。

【讨论】:

    猜你喜欢
    • 2021-07-17
    • 1970-01-01
    • 2011-06-14
    • 1970-01-01
    • 2023-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多