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

QNetworkCookie::parseCookies() do not parse values containing whitespaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 4.7.3
    • Fix Version/s: 4.8.0
    • Component/s: Network: Cookies
    • Labels:
      None
    • Commits:
      c85c1ea36cd9ebe6a9ff970d7ba0ce8d08d5b27b

      Description

      When parsing cookie values with whitespaces, we only keep the value up to the first space:
      e.g (file attached):
      QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(QByteArray("a = b c d;"));
      qDebug() << "Cookie value = " << cookies.first().value() << " (should be \"b c d\")";

      returns "b" instead of "b c d".

      As far as I can see, the spec says the key=value should not include whitespace. But it seems nobody follows that spec and such cookies can be assigned for Chrome and Firefox.

      See https://bugs.webkit.org/show_bug.cgi?id=58973 for more infos.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              phartman Peter Hartmann (closed Nokia identity) (Inactive)
              Reporter:
              poulain Benjamin Poulain (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes