Loading ...
Sorry, an error occurred while loading the content.
 

The '+' character in cookies

Expand Messages
  • Philip Mak
    Is it legal for cookies to contain the + character? It looks like $Request- Cookie will strip + characters out of cookies and replace them with spaces.
    Message 1 of 2 , Feb 20, 2004
      Is it legal for cookies to contain the '+' character?

      It looks like $Request->Cookie will strip '+' characters out of
      cookies and replace them with spaces. This has caused problems in my
      Apache::ASP application that reads cookies containing '+' signs set by
      another application.

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Josh Chamas
      ... Spaces are often escaped to + in URL & form encoding of data. So on the way in, + is converted back to space. The same conversion process is applied to
      Message 2 of 2 , Feb 20, 2004
        Philip Mak wrote:
        > Is it legal for cookies to contain the '+' character?
        >
        > It looks like $Request->Cookie will strip '+' characters out of
        > cookies and replace them with spaces. This has caused problems in my
        > Apache::ASP application that reads cookies containing '+' signs set by
        > another application.

        Spaces are often escaped to + in URL & form encoding of data.

        So on the way in, + is converted back to space. The same conversion
        process is applied to Query/Form/Cookie data.

        The only chance in getting the original + data in a cookie is that
        cookie generator to URL encode + with the %NN version.

        Regards,

        Josh
        ________________________________________________________________________
        Josh Chamas, Founder | NodeWorks - http://www.nodeworks.com
        Chamas Enterprises Inc. | NodeWorks Directory - http://dir.nodeworks.com
        http://www.chamas.com | Apache::ASP - http://www.apache-asp.org



        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      Your message has been successfully submitted and would be delivered to recipients shortly.