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
question about the decisions made in the repository
What is the current behavior?
The browser sends a request that contains both RANGE and IF-RANGE values. Note that the If-Range value is way in the past.
Range: bytes=32768-32768
If-Range: Tue, 21 Nov 2017 14:43:11 GMT
However, the CherryPy Server sends back "206 Partial Content" instead of sendong back the file content and status 200.
The If-Range HTTP request header makes a range request conditional: if the condition is fulfilled, the range request will be issued and the server sends back a 206 Partial Content answer with the appropriate body. If the condition is not fulfilled, the full resource is sent back, with a 200 OK status.
If the current behavior is a bug, please provide the steps to reproduce and if possible a screenshots and logs of the problem.
The following can be replicated using Chrome or FF:
Enable caching in the CherryPy server.
Request a page with cached resources (e.g. JS or CSS files)
Clear the browser cache.
Press F5
Only the HTML part is loaded, the "cached" files are missing and will cause a GET http://localhost:45101/jquery.js net::ERR_CONTENT_DECODING_FAILED in the browser console.
What is the expected behavior?
The CherryPy server should check if the request contains the If-Range header. And if the condition is not fullfilled, send back the resource and status 200, instead of status 206.
What is the motivation / use case for changing the behavior?
This is very annoying, because it prevents the page from loading / refreshing.
You have to do a hard-refresh (Ctrl-F5) to work-around this issue, which cannot be done on mobile devices.
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, e.g. stackoverflow, gitter, etc.)
This should probably be fixed in _serve_fileobj().
Request:
Response:
The text was updated successfully, but these errors were encountered:
The browser sends a request that contains both RANGE and IF-RANGE values. Note that the If-Range value is way in the past.
However, the CherryPy Server sends back "206 Partial Content" instead of sendong back the file content and status 200.
This violates the If-Range header specification
The following can be replicated using Chrome or FF:
GET http://localhost:45101/jquery.js net::ERR_CONTENT_DECODING_FAILED
in the browser console.The CherryPy server should check if the request contains the If-Range header. And if the condition is not fullfilled, send back the resource and status 200, instead of status 206.
This is very annoying, because it prevents the page from loading / refreshing.
You have to do a hard-refresh (Ctrl-F5) to work-around this issue, which cannot be done on mobile devices.
This should probably be fixed in
_serve_fileobj()
.Request:
Response:
The text was updated successfully, but these errors were encountered: