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
Support etag headers #355
Support etag headers #355
Conversation
…rnado already does most of what we want for Etags.
Note to self: check etag behavior for error responses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have not tested yet (on my phone now), but this seems pretty good. Mainly nits about style.
Oh. This should have a test! |
Also just recalled that we have |
… etag computation more legible.
I added a super basic http get test against local files that just checks for appropriate response codes based on whether the client sends the |
Co-Authored-By: jsnshrmn <jsnshrmn@users.noreply.github.com>
…ader in tests for error responses.
I did some manual testing of the head method, and it doesn't behave exactly has desired, since it doesn't have any of the validation that happens for get. I should either drop head, or make sure it performs enough checks to throw errors for bad requests. If we're not planning on doing head requests, I'd just drop it, but I thought I'd check the room. @Mr0grog or @danielballan? |
from test_diffing_server_exc_handling.py
We didn’t support HEAD requests before (I had missed the fact that it was new when reviewing originally), so I’m not sure why we would want to add support for them in this PR. If we did (they might be nice to verify that and endpoint URL corresponds to an actual diff, but I’m not sure we have a real use-case for that, since you can also just check |
That work can be scoped out in its own issue.
I believe this closes #264. This is my first time dealing with Tornado, and I was quite pleased to see that it can do most of the heavy lifting here.
I wasn't exactly sure of the client behavior we wanted to support, so I implemented it for GET and HEAD requests.