qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] block/curl: Improve HTTP header parsing
@ 2020-02-21 16:32 David Edmondson
  2020-02-21 16:32 ` [PATCH v2 1/2] block/curl: HTTP header fields allow whitespace around values David Edmondson
  2020-02-21 16:32 ` [PATCH v2 2/2] block/curl: HTTP header field names are case insensitive David Edmondson
  0 siblings, 2 replies; 3+ messages in thread
From: David Edmondson @ 2020-02-21 16:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, David Edmondson, qemu-block, Max Reitz

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.

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 | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

-- 
2.24.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-21 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 16:32 [PATCH v2 0/2] block/curl: Improve HTTP header parsing David Edmondson
2020-02-21 16:32 ` [PATCH v2 1/2] block/curl: HTTP header fields allow whitespace around values David Edmondson
2020-02-21 16:32 ` [PATCH v2 2/2] block/curl: HTTP header field names are case insensitive David Edmondson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).