-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC 7233 - Range Requests #977
Conversation
Travis seems to have a hard time running redis server on last build :) |
☔ The latest upstream changes (presumably ca1665a) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably 2bc6035) made this pull request unmergeable. Please resolve the merge conflicts. |
@@ -538,6 +540,69 @@ def test_etag_response_mixin(): | |||
response.make_conditional(env) | |||
assert response.content_length == 999 | |||
|
|||
# simple valid Range Request |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@magne4000 I think you goofed up the diff, it now contains unrelated changes. I recommend |
I had to soft reset because I messed up the history, but it's cleaner now. |
☔ The latest upstream changes (presumably 0407d22) made this pull request unmergeable. Please resolve the merge conflicts. |
end = None | ||
last_end = -1 | ||
elif '-' in item: | ||
begin, end = item.split('-', 1) | ||
begin = begin.strip() | ||
end = end.strip() | ||
if not begin.isdigit(): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Excellent work, it's really rare to get a PR of this size with so few errors. Sorry it took so long to review this, but here we go. |
2837b2f
to
3f61999
Compare
self.status_code != 206 | ||
and not is_resource_modified( | ||
environ, self.headers.get('etag'), | ||
None, self.headers.get('last-modified') |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There's one issue left: There are several new public functions. It needs to be decided which ones we want to expose, those have to be added to the |
Don't know if we need something more |
If they're protected they should be prefixed by underscore IMO, but will have to look how rest of Wz handles this. On 7 September 2016 13:17:58 CEST, "Joël Charles" notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
That is already the case |
Ah sorry, I forgot there were mostly new methods there. Do we really want to expose RangeWrapper? It seems like out of scope for Werkzeug as a WSGI library (like many things in Werkzeug, see #4). Also imports from |
Also not our problem, but I'd rather create a third-party package with this API than exposing it here. On 8 September 2016 11:08:10 CEST, Armin Ronacher notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
@untitaker sure. But we already need to include this thing internally anyways. So it's not like we can delete that code. |
We shouldn't incitate one to instanciate this class. Instead, as I added in the doc, the response data object must implement a part of |
If we suddenly don't need it anymore we can't delete it either without API breakage. With your philosophy taken to the extreme, no refactor would be possible without bumping the major version. On 8 September 2016 11:12:51 CEST, Armin Ronacher notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
Let's keep it private for now then and add a comment to decide on what to do with it in the future. |
@magne4000 Could you add that comment? Thanks! |
Should I prefix the comment with a specific sphinx markup ? |
…nnal to give details on how to optimize it's use in Range Request context
No I think a normal On Thu, Sep 08, 2016 at 04:48:53AM -0700, Joël Charles wrote:
|
Excellent, thank you! |
😉 |
Also thanks for being patient with the bit-by-bit review I did. I do try to review your PR in large chunks, but some things only come to mind after a while. |
No probs, that was necessary, this was not a tiny PR 😄 |
Impressive work, thanks! |
See #978 for details.