Skip to content
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

don't send Content-Type or Content-Length for 304 #211

Closed
chadwhitacre opened this issue Aug 9, 2013 · 7 comments
Closed

don't send Content-Type or Content-Length for 304 #211

chadwhitacre opened this issue Aug 9, 2013 · 7 comments

Comments

@chadwhitacre
Copy link
Contributor

Got burned by this on gratipay/gratipay.com#1308.

@chadwhitacre
Copy link
Contributor Author

The spec actually says not to send most entity-headers for 304:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5

The entity headers are listed here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1

@pjz
Copy link
Contributor

pjz commented Aug 10, 2013

So... we don't. In fact, we basically only send the Location header (plus any the developer provides) if you call request.redirect(). The bug in gratipay/gratipay.com#1308 is in your cache_static code (which, yes, should maybe be moved upstream into aspen, but isn't, as of yet)

So this isn't actually an aspen bug.

@chadwhitacre
Copy link
Contributor Author

IRC

tl;dr : 0.25.3 might have fixed this already.

@chadwhitacre
Copy link
Contributor Author

I believe this is accidentally implemented as a side-effect of 64b9208 (cf. gratipay/gratipay.com#1449). We should write a couple tests to be sure and then close.

@chadwhitacre
Copy link
Contributor Author

@pjz Could we get two tests for this if we don't have them? Then we should be able to close.

@pjz
Copy link
Contributor

pjz commented Oct 15, 2013

test_website.py has test_redirect_has_only_location, which asserts there's exactly one header returned and that it's a 'Location' header. So this should just be closed.

@pjz pjz closed this as completed Oct 15, 2013
@chadwhitacre
Copy link
Contributor Author

🍒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants