Jetty
  1. Jetty
  2. JETTY-246

spaces wrongly encoded in cookies

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.2rc0
    • Fix Version/s: 6.1.2rc2
    • Component/s: None
    • Labels:
      None
    • Environment:
      java version "1.5.0_11"
    • Number of attachments :
      0

      Description

      A space " " in a cookie should be encoded as "%20" not as "". With the current encoding of "" it never gets decoded back to a space.

        Activity

        Hide
        Franklin Schmidt added a comment -

        Seems like Codehaus has encoding issues too, and messed up my description. Let me try again:

        A space " " in a cookie should be encoded as "%20" not as "+". With the current encoding of "+" it never get decoded back to " ".

        Show
        Franklin Schmidt added a comment - Seems like Codehaus has encoding issues too, and messed up my description. Let me try again: A space " " in a cookie should be encoded as "%20" not as "+". With the current encoding of "+" it never get decoded back to " ".
        Hide
        Greg Wilkins added a comment -

        Fixed - using matching decode mechanism now

        Show
        Greg Wilkins added a comment - Fixed - using matching decode mechanism now
        Greg Wilkins made changes -
        Field Original Value New Value
        Fix Version/s 6.1.2rc1 [ 13230 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Franklin Schmidt added a comment -

        I see that "+" is now encoded as "%2B" and " " is encoded as "+". This is internally consistent but it does not match the behavior of JavaScript's escape() and unescape() . The problem is that I want to be able to use cookies from both Java and JavaScript, so it would be better if Jetty's encoding and decoding of cookies matched JavaScript's escape() and unescape() .

        Show
        Franklin Schmidt added a comment - I see that "+" is now encoded as "%2B" and " " is encoded as "+". This is internally consistent but it does not match the behavior of JavaScript's escape() and unescape() . The problem is that I want to be able to use cookies from both Java and JavaScript, so it would be better if Jetty's encoding and decoding of cookies matched JavaScript's escape() and unescape() .
        Greg Wilkins made changes -
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Greg Wilkins [ gregw ]
        Resolution Fixed [ 1 ]
        Hide
        Greg Wilkins added a comment -

        Cookies are now path encoded

        Show
        Greg Wilkins added a comment - Cookies are now path encoded
        Greg Wilkins made changes -
        Fix Version/s 6.1.2rc1 [ 13230 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 6.1.2rc2 [ 13310 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Greg Wilkins
            Reporter:
            Franklin Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: