I’ve got a intermittent problem with SSL and Apache.
Sometimes, perhaps once every 10 requests or so, when requesting a SSL page it causes the browser to download the page instead of displaying it.
Exact same site (PHP) without SSL has never had a problem.
The file that is downloaded has 26 bytes of binary (mostly 0x00), and then it has the correct HTTP headers and the content.
It always starts with 1F 8B 08 00.
For some reason its tripping up browsers.
I cant packet sniff it since its SSL.
It’s likely that your first characters are being interpreted as a non-binary file identifier - something that Apache does not consider to be downloadable with the file headers it’s retrieved. I’m not sure how to verify that not knowing what the file is and the simple fact that it’s intermittant (and SSL).
No this has to be coming from Apache when it processes the SSL.
The HTTP headers from Apache are below the binary.
Turns out the 1F 8B 08 00 is the magic byte for gzip.
I’ve just decoded the binary part before the HTTP headers and it turns out to be what you get when you gzip a empty file.
I dont have a clue why or how a empty gzipped file could be output before the HTTP headers intermittently and only with ssl.
It goes <empty gzip><valid http headers><valid content>