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

QNetworkReply converts the header names in raw headers to lowercase

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS, macOS, Windows

    Description

      QNetworkReply converts the header names in raw headers to lowercase, even when the original packet data specifies uppercase letters.

      • The result from Qt 6.8.1 is described below as an example.
      • I used the attached reproducer for the check, with using "http://www.qt.io" as the server URL.
      • As far as I checked, this behavior was observed with Qt 6.8.1 / 6.7.3 / 6.5.8 on Windows, Qt 6.8.1 / 6.7.3 / 6.5.8 on MacOS/iOS,
      • Not observed with Qt 5.15.18/5.15.17 on Windows, Qt 5.15.18 on MacOS.

      Is this a intended change implemented in Qt 6?

      <debug log with Qt 6.8.1>

      15:33:44: Starting C:\qt_projects\untitled63_httpclient\build\Desktop_Qt_6_8_1_MSVC2022_64bit-Debug\untitled63_httpclient.exe...
      "date"
      "content-type"
      "cf-ray"
      "cf-cache-status"
      "cache-control"
      "last-modified"
      "set-cookie"
      "strict-transport-security"
      "vary"
      "access-control-allow-credentials"
      "cache-tag"
      "content-security-policy"
      "edge-cache-tag"
      "referrer-policy"
      "x-content-type-options"
      "x-envoy-upstream-service-time"
      "x-evy-trace-listener"
      "x-evy-trace-route-configuration"
      "x-evy-trace-route-service-name"
      "x-evy-trace-served-by-pod"
      "x-evy-trace-virtual-host"
      "x-frame-options"
      "x-hs-cache-config"
      "x-hs-content-campaign-id"
      "x-hs-content-id"
      "x-hs-hub-id"
      "x-hubspot-correlation-id"
      "x-request-id"
      "report-to"
      "nel"
      "server"
      "content-encoding"
      "alt-svc"

      <Corrsponding raw data from the packet>

      0000   48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76   HTTP/1.1 301 Mov
      0010   65 64 20 50 65 72 6d 61 6e 65 6e 74 6c 79 0d 0a   ed Permanently..
      0020   44 61 74 65 3a 20 46 72 69 2c 20 32 30 20 44 65   Date: Fri, 20 De
      0030   63 20 32 30 32 34 20 30 36 3a 33 33 3a 35 34 20   c 2024 06:33:54 
      0040   47 4d 54 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e   GMT..Content-Len
      0050   67 74 68 3a 20 30 0d 0a 43 6f 6e 6e 65 63 74 69   gth: 0..Connecti
      0060   6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a   on: keep-alive..
      0070   4c 6f 63 61 74 69 6f 6e 3a 20 68 74 74 70 73 3a   Location: https:
      0080   2f 2f 77 77 77 2e 71 74 2e 69 6f 2f 0d 0a 43 61   //www.qt.io/..Ca
      0090   63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 73 2d 6d   che-Control: s-m
      00a0   61 78 61 67 65 3d 33 36 30 30 2c 6d 61 78 2d 61   axage=3600,max-a
      00b0   67 65 3d 31 32 30 0d 0a 58 2d 48 73 2d 48 74 74   ge=120..X-Hs-Htt
      00c0   70 73 2d 4f 6e 6c 79 3a 20 77 6f 72 6b 65 72 0d   ps-Only: worker.
      00d0   0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 5f 5f 63   .Set-Cookie: __c
      00e0   66 5f 62 6d 3d 2e 43 55 4b 41 39 6c 33 4e 49 70   f_bm=.CUKA9l3NIp
      00f0   4b 5a 37 43 41 5a 47 58 34 65 45 51 58 54 59 32   KZ7CAZGX4eEQXTY2
      0100   67 68 47 6a 36 5f 66 37 58 5a 4f 53 6a 51 44 30   ghGj6_f7XZOSjQD0
      0110   2d 31 37 33 34 36 37 36 34 33 34 2d 31 2e 30 2e   -1734676434-1.0.
      0120   31 2e 31 2d 4b 6a 6b 62 47 54 4d 35 76 4d 4f 4b   1.1-KjkbGTM5vMOK
      0130   45 65 65 53 6d 44 39 7a 78 36 49 38 62 53 47 73   EeeSmD9zx6I8bSGs
      0140   65 6b 73 37 4b 51 62 73 69 4d 44 51 78 4a 6f 76   eks7KQbsiMDQxJov
      0150   62 78 77 79 35 72 47 66 75 47 6c 34 75 54 69 78   bxwy5rGfuGl4uTix
      0160   59 58 6e 30 78 67 57 66 62 39 68 57 67 6d 50 38   YXn0xgWfb9hWgmP8
      0170   6f 4a 4c 64 49 48 65 52 68 67 3b 20 70 61 74 68   oJLdIHeRhg; path
      0180   3d 2f 3b 20 65 78 70 69 72 65 73 3d 46 72 69 2c   =/; expires=Fri,
      0190   20 32 30 2d 44 65 63 2d 32 34 20 30 37 3a 30 33    20-Dec-24 07:03
      01a0   3a 35 34 20 47 4d 54 3b 20 64 6f 6d 61 69 6e 3d   :54 GMT; domain=
      01b0   2e 77 77 77 2e 71 74 2e 69 6f 3b 20 48 74 74 70   .www.qt.io; Http
      01c0   4f 6e 6c 79 0d 0a 52 65 70 6f 72 74 2d 54 6f 3a   Only..Report-To:
      01d0   20 7b 22 65 6e 64 70 6f 69 6e 74 73 22 3a 5b 7b    {"endpoints":[{
      01e0   22 75 72 6c 22 3a 22 68 74 74 70 73 3a 5c 2f 5c   "url":"https:\/\
      01f0   2f 61 2e 6e 65 6c 2e 63 6c 6f 75 64 66 6c 61 72   /a.nel.cloudflar
      0200   65 2e 63 6f 6d 5c 2f 72 65 70 6f 72 74 5c 2f 76   e.com\/report\/v
      0210   34 3f 73 3d 6e 77 41 71 7a 66 46 44 55 41 6c 41   4?s=nwAqzfFDUAlA
      0220   47 30 4d 6a 4e 55 74 64 46 47 53 39 6f 46 64 39   G0MjNUtdFGS9oFd9
      0230   45 69 32 47 65 6a 6f 63 56 76 42 57 6c 4b 72 65   Ei2GejocVvBWlKre
      0240   37 25 32 42 4b 6c 4c 67 53 6e 6e 62 4d 74 37 54   7%2BKlLgSnnbMt7T
      0250   33 66 41 6e 4f 4c 74 72 77 4b 54 5a 53 55 5a 35   3fAnOLtrwKTZSUZ5
      0260   64 43 76 73 45 50 51 6f 57 31 71 31 68 66 70 6e   dCvsEPQoW1q1hfpn
      0270   48 69 58 48 34 31 6d 69 52 46 56 34 66 79 5a 54   HiXH41miRFV4fyZT
      0280   58 68 52 68 63 57 36 72 69 55 52 43 78 67 62 51   XhRhcW6riURCxgbQ
      0290   25 33 44 25 33 44 22 7d 5d 2c 22 67 72 6f 75 70   %3D%3D"}],"group
      02a0   22 3a 22 63 66 2d 6e 65 6c 22 2c 22 6d 61 78 5f   ":"cf-nel","max_
      02b0   61 67 65 22 3a 36 30 34 38 30 30 7d 0d 0a 4e 45   age":604800}..NE
      02c0   4c 3a 20 7b 22 73 75 63 63 65 73 73 5f 66 72 61   L: {"success_fra
      02d0   63 74 69 6f 6e 22 3a 30 2e 30 31 2c 22 72 65 70   ction":0.01,"rep
      02e0   6f 72 74 5f 74 6f 22 3a 22 63 66 2d 6e 65 6c 22   ort_to":"cf-nel"
      02f0   2c 22 6d 61 78 5f 61 67 65 22 3a 36 30 34 38 30   ,"max_age":60480
      0300   30 7d 0d 0a 56 61 72 79 3a 20 41 63 63 65 70 74   0}..Vary: Accept
      0310   2d 45 6e 63 6f 64 69 6e 67 0d 0a 53 65 74 2d 43   -Encoding..Set-C
      0320   6f 6f 6b 69 65 3a 20 5f 63 66 75 76 69 64 3d 42   ookie: _cfuvid=B
      0330   66 45 46 55 55 77 59 68 33 41 53 68 5a 6c 65 79   fEFUUwYh3AShZley
      0340   4e 50 52 37 45 63 45 32 38 76 6a 75 6e 78 71 59   NPR7EcE28vjunxqY
      0350   56 64 35 79 76 51 56 79 6e 6b 2d 31 37 33 34 36   Vd5yvQVynk-17346
      0360   37 36 34 33 34 38 38 31 2d 30 2e 30 2e 31 2e 31   76434881-0.0.1.1
      0370   2d 36 30 34 38 30 30 30 30 30 3b 20 70 61 74 68   -604800000; path
      0380   3d 2f 3b 20 64 6f 6d 61 69 6e 3d 2e 77 77 77 2e   =/; domain=.www.
      0390   71 74 2e 69 6f 3b 20 48 74 74 70 4f 6e 6c 79 0d   qt.io; HttpOnly.
      03a0   0a 53 65 72 76 65 72 3a 20 63 6c 6f 75 64 66 6c   .Server: cloudfl
      03b0   61 72 65 0d 0a 43 46 2d 52 41 59 3a 20 38 66 34   are..CF-RAY: 8f4
      03c0   64 39 61 38 35 64 65 33 31 65 30 37 61 2d 4e 52   d9a85de31e07a-NR
      03d0   54 0d 0a 61 6c 74 2d 73 76 63 3a 20 68 33 3d 22   T..alt-svc: h3="
      03e0   3a 34 34 33 22 3b 20 6d 61 3d 38 36 34 30 30 0d   :443"; ma=86400.
      03f0   0a 0d 0a                                          ...

      Attachments

        1. untitled63_httpclient.zip
          2 kB
          Hitoshi Ito
        2. packets.pcapng
          2 kB
          Hitoshi Ito

        Issue Links

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

          Activity

            People

              manordheim Mårten Nordheim
              hitoshiito Hitoshi Ito
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes