Skip to content

block/curl: Improve HTTP header parsing

David Edmondson qemu-devel 3 versions – Applied

Status from this message: Thanks, applied to my block branch:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesApplied
  2. v22 patches 0 repliesSuperseded
  3. v12 patches 1 replySuperseded

Changes in v3 from the cover letter

- fix line length.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2block/curl: HTTP header fields allow whitespace around valuesblock/curl.c+27 -41 reply
2/2block/curl: HTTP header field names are case insensitiveblock/curl.c+3 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMax Reitz
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] block/curl: Improve HTTP header parsing

An HTTP object store of my acquaintance returns "accept-ranges: bytes" (all lower case) as a header, causing the QEMU curl backend to refuse to talk to it. RFC 7230 says that HTTP headers are case insensitive, so update the curl backend accordingly.

At the same time, allow for arbitrary white space around the HTTP header field value, as required by the RFC.

v3:
- fix line length.

v2:
- strncasecmp -> g_ascii_strncasecmp (Philippe).
- isspace -> g_ascii_isspace, for good measure.

David Edmondson (2):
block/curl: HTTP header fields allow whitespace around values block/curl: HTTP header field names are case insensitive

 block/curl.c | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)
Signature · 1 line
2.24.1