Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

reset.css doesn't load sometimes #1308

Closed
chadwhitacre opened this issue Aug 8, 2013 · 11 comments
Closed

reset.css doesn't load sometimes #1308

chadwhitacre opened this issue Aug 8, 2013 · 11 comments

Comments

@chadwhitacre
Copy link
Contributor

@clone1018 saw this when we first started caching static assets. It's why I turned off static caching initially. Now static caching is back with #1245 and indeed we're seeing this again. :(

2013-08-06_11-47-55

@chadwhitacre
Copy link
Contributor Author

This is tricky to debug because by the time you open the network tab of the debug console and refresh, the bug goes away.

@clone1018
Copy link
Contributor

I'm gonna assume that's because chrome forces a cache clear when dev tools is opened. No idea how to reproduce though.

@chadwhitacre
Copy link
Contributor Author

I am definitely hitting this "often." I wrote a script to smash at reset.css a little bit:

https://gist.github.com/whit537/18046310e4c6db689741

Here's the result of running that for a while:

https://gist.github.com/whit537/91dafe2a6239a44a88c5

It looks like we're alternating between Content-Length: 867 and transfer-encoding: chunked. I don't really trust Cheroot's chunked encoding implementation, because of AspenWeb/pando.py#140. Perhaps the failures are when we send reset.css chunked? But why in that case does this only show up now that we've started caching? Somehow that has to play in. The script above doesn't sent any caching headers. Maybe it should send If-Modified-Since.

@chadwhitacre
Copy link
Contributor Author

I looked at a sniffer:

HTTPScoop works great but it can't read SSL. They recommend setting up a reverse proxy:

http://www.tuffcode.com/support.html#support7

@chadwhitacre
Copy link
Contributor Author

Apparently Wireshark can be used to decrypt SSL:

http://wiki.wireshark.org/SSL

@clone1018
Copy link
Contributor

I use Fiddler normally, it just installs a certificate proxy so you can decrypt and view.

@chadwhitacre
Copy link
Contributor Author

Windows only. :(

@chadwhitacre
Copy link
Contributor Author

@clone1018 Next time you see this can you grab a capture with Fiddler? I find that a simple refresh gives me the same missing-reset behavior.

@chadwhitacre
Copy link
Contributor Author

We could probably fix this by moving reset.css to the CDN but it'd be better to get to the bottom of this if we can.

@chadwhitacre
Copy link
Contributor Author

Eureka!

For 304 the content-type is text/html!

IRC

Found using http://www.charlesproxy.com/, per @greggles.

@chadwhitacre
Copy link
Contributor Author

Here's where Tornado dealt with this:

https://groups.google.com/forum/#!topic/python-tornado/-P_enYKAwrY

Looks like it's safe to simply unset Content-Type for 304 (we're already not sending Content-Length).

My apologies to Cheroot. :-)

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

No branches or pull requests

2 participants