[200 OK]: A Port80 Software Blog

We're all 200 OK: Web, HTTP and IIS Insights
posts - 199, comments - 719, trackbacks - 95

The Safari browser and its "bad server response" error

Many administrators who use compression on their web servers can probably tell you how fastidious the Safari browser can be when it receives compressed data. This is the browser that is developing a reputation for the dreaded "bad server response" (NSURLerrorDomain:-1011) error message that gets thrown ostensibly by merely sending compressed data.

This, however, has more to do with how the data is sent than the data being compressed. This message is likely to show when a compressed response is sent without either the Content-length header or the Transfer-encoding: chunked header.

Whether the Content-length header is sent is highly dependent on the application server and scripting environment. ColdFusion and Tomcat often leave out the Content-Length value when they stream the data to the server. (This can sometimes be fixed inside these scripting environments by calculating the content length in your code.)

For users of httpZip 2.0.X there are two recommendations for accommodating this browser:

Adding a browser exclusion for the Safari browser

This will eliminate compressed content from being sent to the Safari family of browsers altogether. Safari users are likely to make up a very small percentage of your user base. This option is for those who want to break out the big gun for this problem.

Through the httpZip interface, click Configuration > Browsers, then build an exclusion for the Safari browser. You can use "Safari" as the UA Search String. You should only need to add the application, image and text MIME types under the Safari browser. Be sure that "compress" is deselected for each of these MIME types.

Changing the Streaming Configuration

When the Streaming Configuration in httpZip is changed from the default "Compress streams" to "Buffer streams, then compress," httpZip will buffer the response and, in most cases, provide a Content-length value with the compressed responses, preventing this error message from occurring.

posted on Friday, February 25, 2005 4:26 PM

Feedback

# re: The Safari browser and its "bad server response" error

<html>
<head>
<body>
3/1/2005 5:29 PM | ratha

# re: The Safari browser and its "bad server response" error

sorry, but can some one elaborate on this error?

waiting for help...

Yolanda Krag
5/3/2005 8:56 AM | Yolanda Krag

# re: The Safari browser and its "bad server response" error

When trying to access this on Safari I get a message The error was: “bad server response” (NSURLErrorDomain:-1011). The url is from this very page:
http://www.port80software.com/200ok/archive/2005/02/25/349.aspx

which is why I've had to access this on Explorer.

This happens with numerous other sites. Is there a plug in to fix this? I'm sure it has to do with the proxy server, because when it is off, everything works fine.

Eric
3/30/2006 6:57 PM | Eric

# re: The Safari browser and its

3/30/2006 6:57 PM | [200 OK]: A Port80 Software Blog

# re: The Safari browser and its "bad server response" error

Can't open the page.
http;// flagship2. vanguard.com/VGApp/hnw/SMCInfo center
mail response partNumber=&message number=
8/15/2006 4:16 PM | John Cosgrove

# re: The Safari browser and its "bad server response" error

buxiugangguan
3/20/2008 12:58 AM | 不锈钢管

# re: The Safari browser and its "bad server response" error

thanks nice text
4/7/2008 7:46 AM | software

# re: The Safari browser and its "bad server response" error

Thanks for the article
4/21/2008 12:24 AM | kral oyun

Post Comment

Title:  
Name:  
Url:  
Comment:  
Verify:
(Enter the word as it appears in the box above.)