Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-39250

QNetworkCookie::toRawForm(): Encode value string according to standard

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 5.3.0
    • Network: HTTP
    • None
    • Linux (ArchLinux x64)

    Description

      QNetworkCookie::toRawForm() does not correctly encode the value string which is against RFC 2109 (As noted in the QNetworkCookie docs).

      The RFC states that the value should not contain whitespace ("(informally, a sequence of non-special, non-white space characters)" Section 4.1).
      It seems like a common approach is to URL-encode the value instead [1].

      For this, QNetworkCookie::parseCookies()s helper method 'nextField()' would need to support percent encoded values too.

      If this bug is rejected, the documentation should tell the user that one should manually encode values.

      [1] stackoverflow.com/questions/572482/#tab-top

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            peter-har Peter Hartmann
            craftkorb Stefan Merettig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes