Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
None
-
None
Description
RFC7230 on the order of the http header fields:
The order in which header fields with differing field names are received is not significant. However, it is good practice to send header fields that contain control data first, such as Host on requests and Date on responses, so that implementations can decide when not to handle a message as early as possible.
Ref: https://tools.ietf.org/html/rfc7230#section-3.2.2
There are are some server implementations that uses the User-Agent AND the order of the header fields to determine what client the user is actually using. Most http-clients offer to override the User-Agent, but the field order is in most cases not possible to specify.
See attached images for how an Incapsula-enabled site sends a different response where two clients sends the same header data, but in different order.
If we had a way to specify the order of fields, it would be possible to circumvent these restrictions.
QHttpNetworkRequestPrivate::header
This function should have access to a list of strings containing the desired order of the headers. When producing the http header chunk, the ordered headers should be prioritized first.
Any remaining headers should be added last.
Attachments
Issue Links
- relates to
-
QTBUG-51557 QHttpNetworkConnection: Move http header field "host" to the top
- Closed