NEW 143512
Accept-Ranges parsing
https://bugs.webkit.org/show_bug.cgi?id=143512
Summary Accept-Ranges parsing
Mark Nottingham
Reported 2015-04-07 21:54:24 PDT
In /WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp StreamingClient::handleResponseReceived(), the HTTP Accept-Ranges header is parsed like this: """ priv->seekable = length > 0 && g_ascii_strcasecmp("none", response.httpHeaderField(HTTPHeaderName::AcceptRanges).utf8().data() """ This means that if the string "none" shows up in the header at all, it will match -- making it error-prone if a range using that sequence of characters is ever defined. The syntax isn't difficult to parse, it's a comma-separated list of tokens with optional whitespace (the same as several other headers): http://httpwg.github.io/specs/rfc7233.html#header.accept-ranges (found by Rodger Combs on the IETF HTTP WG mailing list)
Attachments
Ridley Combs
Comment 1 2015-04-08 06:27:26 PDT
Correction: the current implementation matches only if the header value is exactly "none", which means it'd be error-prone if the server reported some range unit other than "bytes" (the one WebKit actually supports).
Ridley Combs
Comment 2 2018-08-07 16:01:19 PDT
Ping; noticed that Firefox fixed a similar bug earlier today.
Note You need to log in before you can comment on or make changes to this bug.