Set-Cookie:通配符“路径" [英] Set-Cookie: Wildcard "Path"

查看:38
本文介绍了Set-Cookie:通配符“路径"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 HTTP Set-Cookie 请求中的path"参数前放置通配符?

Is it possible to place a wildcard infront of the "path" parameter in a HTTP Set-Cookie request?

示例:

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

推荐答案

检查 RFC 6265 HTTP 状态管理机制,5.1.4.路径和路径匹配:

 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.

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

It does not mention any wildcard handling, so it's not possible to use wildcards in the path.

这篇关于Set-Cookie:通配符“路径"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆