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

Support for + encoded space would be convenient in QUrlQuery::queryItem*()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 4.8.5, 5.2.0
    • None

    Description

      I'm using QUrlQuery to parse HTTP URLs within an HTTP server and am facing the fact that when a web browser send data from an HTML form it always encode spaces as + instead of %20. And there are even no way to change that in the client side (apart from javascript) since even HTML 5 provides only binary or + encoding options.

      I agree that + encoding is both odd and not compliant with URLs specification (RFC3986 and the like).
      However, having a QUrl::HtmlFormEncoded in addition to QUrl::FullyEncoded in QUrl::ComponentFormattingOptions would enable a server to switch to this encoding when relevant.

      I don't reopen QTBUG-10146 because I don't want support for default + encoding but for optionnal + decoding.

      If someone agree with this proposal, I may even try to make a patch by myself if this is not viewed as a priority (in a general manner I don't think server-side is a priority for Qt and the current implementation - encoding spaces as %20 - is a good solution on the client-side).

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            g76r Greg
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes