2011-11-04 15 views
20

¿Es posible colocar un comodín delante del parámetro "ruta" en una solicitud HTTP Set-Cookie?Set-Cookie: "Ruta" del comodín

ejemplo:

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

Respuesta

36

Comprobar 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. 

no menciona ninguna manipulación comodín, así que no es posible utilizar comodines en el camino.

0

petición-path path-partidos una cookie-ruta dada si al menos una de las condiciones siguientes bodegas:

  • La cookie-path y la solicitud de trayectoria son idénticos
  • La cookie-path es un prefijo de la solicitud de la ruta, y el último carácter de la galleta-ruta es %x2F ("/")
  • la cookie-path es un prefijo de la solicitud de la ruta, y el primer carácter de la solicitud de la ruta que no está incluido en el cookie-path es un carácter %x2F ("/")

No menciona el manejo de comodines, por lo que no es posible usar comodines en la ruta.