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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.0
    • 4.7.3
    • Network: Cookies
    • None
    • 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

              phartman Peter Hartmann (closed Nokia identity) (Inactive)
              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