<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Accept-Ranges parsing"
href="https://bugs.webkit.org/show_bug.cgi?id=143512">143512</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Accept-Ranges parsing
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>528+ (Nightly build)
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>WebCore Misc.
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mnot@mnot.net
</td>
</tr></table>
<p>
<div>
<pre>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):
<a href="http://httpwg.github.io/specs/rfc7233.html#header.accept-ranges">http://httpwg.github.io/specs/rfc7233.html#header.accept-ranges</a>
(found by Rodger Combs on the IETF HTTP WG mailing list)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>