You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Response.make_conditional(..., accept_ranges=True) does not send Accept-Ranges header early enough #3108
#1711 refactored the _process_range_request method. Before, it used to set Accept-Ranges as the first thing it did. Now, it only sets Accept-Ranges when sending a response to a Range request, which defeats the point of that header (which is to advertise support for range requests, so it's not useful if the client is already doing a range request).
when making a request against this with curl -i http://127.0.0.1:5000/, there is no Accept-Ranges header. It only appears when doing a range request like curl -i http://127.0.0.1:5000/ -H "Range: bytes=0-7". Note that when changing the version constraint to werkzeug<1.0 (before #1711 was merged), we do see Accept-Ranges in the response to the basic request.
The fix would be to move the setting of Accept-Ranges back to the very beginning of _process_range_request.
Activity