When browser requests many resources simultaneously, some requests appear to get dropped
I have no idea how to properly debug this. What I do notice is that when visiting a web page with lots of fonts required (due to math rendering), not all font requests ever go through, and the web browser just sits there, waiting for the response for those. This happens consistently.
I wish I could write a more helpful bug report.
Updates: I know now it gets as far as the httpd-log call in httpd-send-file, because that shows up in the log buffer. I inserted a conditional debug statement (when (string-match *one-font-name-out-of-many* path) (debug)) inside the with-temp-buffer call, and then for some reason all resources got served correctly (except for the one still stuck in debug, of course, but that too once I continued).
I may troubleshoot this further the next time it bothers me, but right now I'm fine because now the resources are in my browser cache so any potential bugs do not bother me as much...
I wonder if it's some sort of data encoding issue that's causing the Content-Length header to differ from what's actually being served. Serving less than the claimed length would hang the browser, as it waits for more.
Things to try:
-
Download the problematic files one at a time from simple-httpd with curl and see if there are any issues.
-
Run the server in batch mode (httpd-batch-start) when you try your tests in order to create a minimal scenario.
Your hypothesis makes sense. Good suggestions for further troubleshooting. Will keep those in mind next time it happens!