nav-left cat-right

Fixing "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error" with Google Chrome

Without starting a browser flamewar, I'll just say that Google Chrome is a nice idea, but I won't be switching any time soon. As software evolves, competitors always appear, distilling out the good parts of existing products to create their take on something, and make it better. Google has done that with Chrome; it's light and fast and responsive. Unfortunately, it's still a bit green on the battlefield.

Take this particular error for instance: Error 320 (net::ERR_INVALID_RESPONSE): Unknown error. Have you seen this? I was emailed the other day by someone who was browsing a site I am responsible for that "the site is down! when will it be fixed?!". Seeing that it was fine in all my "normal" test browsers (Firefox, Safari, Opera, IE6, IE7), I gritted my teeth against the inevitable email conversation to follow that would be necessary to get even the slightest helpful detail out of this person.

Eventually, it came out that this person was using Chrome, and sure enough, I immediately got the same error when I fired it up. Not only was this particular site down, but every site on the server gave the same response. Chrome would not load a single page from any site, complaining only that "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error" was upon it, like some kind of HTTP Götterdämmerung.

Googling wasn't immediately helpful; mostly forum threads complaining about the same problem, but no real fixes were presented. Amusingly, it seemed that at one time a lot of Chrome users couldn't use Chrome to access Gmail because of this error. However, I managed to find a thread on Google code which turned out to be somewhat enlightening. The problem appears to be in the way that Chrome handles HTTP headers, where certain forms of some HTTP headers will trigger the error, causing Chrome to pack it in. To be fair, it's really a Windows/Microsoft problem, as the bug is apparently in the underlying WinHTTP service, which Chrome utilizes.

The good news is that the Google devs have apparently solved the problem by switching away from WinHTTP, and it has apparently been fixed in the development branches already. Unfortunately, that's only good news if your average user has downloaded the development version of Chrome, and not if you're a website owner and someone is complaining about your site.

Armed with the knowledge that it was a header problem, without doing any further research I went ahead and upgraded Apache. The server in question had been running version 2.2.6, and I upgraded to Apache 2.2.11.

I was extremely pleased to discover that this actually fixed the problem. Chrome immediately worked just fine, and I immediately cracked open a self-congratulatory beer.

Without examining the Apache changelogs to discover what might have fixed it, I'm happy to just give kudos to those people that deal with that level of the web, and were clever enough to change/fix whichever header it was (I have a hunch it was a mod_rewrite issue, but I'm talking out my posterior on that one). That being said, Chrome (and WinHTTP) should be able to handle invalid HTTP headers, especially if it's an unimportant one and the page content can be salvaged. It's the web… things get garbled and junky all the time (have you ever seen a MySpace page?)

Unfortunately, the end result of this is that now I have yet another browser that I have to check things with when doing web development.

Just what I wanted Chrome to be.

Be Sociable, Share!

3 Responses to “Fixing "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error" with Google Chrome”

  1. Ra says:

    Chorme is being updated all the times. Try, use it for a week and then tell me that you won't use it.

  2. karim says:

    pk sa marche pas

  3. Nils says:

    Seems like the problem has again surfaced…. at least on my websites… :(

Leave a Reply