Curtis Spencer
2006-Jun-07 23:56 UTC
[Mongrel] Ajax and IE causing Page Not Found and 500 Errors behind SSL
Hi, Forgive this if it is a duplicate, because I was having trouble posting to the list. I have a setup of mongrel behind an apache proxy and I am getting a few people using IE (5.5 & 6.0) complaining about getting sporadic page not found errors when using AJAX features of the site and file uploads behind SSL. I am posting the research I have done on the subject. I have the following in my Apache conf <IfModule setenvif_module> BrowserMatch ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </IfModule> in an effort to make SSL work better with IE, but I am still getting the problem. I am not sure if this is working as I have tried the following: curl -D header -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" https://www.server .com and I get the following result in the headers: HTTP/1.1 200 OK Date: Wed, 07 Jun 2006 23:35:41 GMT Server: Mongrel 0.3.12.4 Content-Length: 7363 Status: 200 OK Cache-Control: no-cache Content-Type: text/html Set-Cookie: _session_id=4a000ec09f7b9fd417400ec3d9235492; path=/ Vary: Accept-Encoding X-Pad: avoid browser bug Should I see HTTP/1.0 200 OK instead? Even when I request something that is cached I get the following: HTTP/1.1 200 OK Date: Wed, 07 Jun 2006 23:39:56 GMT Server: Apache Last-Modified: Wed, 07 Jun 2006 23:39:12 GMT ETag: "2b1f-709d-dfe82800" Accept-Ranges: bytes Content-Length: 28829 Vary: Accept-Encoding Content-Type: text/html so it appears that HTTP/1.1 is still in effect, which may be problematic. The site worked fine with lighttpd and fastcgi, and I used the following in my lighttpd.conf to get around it: $HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" { server.max-keep-alive-requests = 0 } Does someone know an Apache snippet to disable keepalives for IE when it is behind SSL, so hopefully I can make this go away? I thought the above BrowserMatch snippet would work, but I am having mixed results with it. These Apache environment variables may hold the key, but at this point I am just guessing: force-proxy-request-1.0, proxy-nokeepalive, proxy-sendchunked, proxy- sendcl Thanks, Curtis
Zed Shaw
2006-Jun-08 09:56 UTC
[Mongrel] Ajax and IE causing Page Not Found and 500 Errors behind SSL
On Wed, 2006-06-07 at 16:56 -0700, Curtis Spencer wrote:> Hi, > > Forgive this if it is a duplicate, because I was having trouble > posting to the list. > > I have a setup of mongrel behind an apache proxy and I am getting a > few people using IE (5.5 & 6.0) complaining about getting sporadic > page not found errors when using AJAX features of the site and file > uploads behind SSL. I am posting the research I have done on the > subject. >Hey Curtis, can you tell me the versions of your operating system, Apache, Mongrel, and Ruby? Can''t really go on much without that. As for HTTP/1.1 -- Mongrel is an HTTP/1.1 only web server. There should be no clients that claim to be 1.0 anymore, but Mongrel will accept requests from them, it just doesn''t do much to support 1.0. Trying to support both is really not worth the effort in order to support such a tiny share of the servers out there. If you have 1.0 clients that absolutely can''t be upgraded, then put Mongrel behind apache (like you are) or Pound and have those proxy servers do the translation. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/
Curtis Spencer
2006-Jun-08 18:27 UTC
[Mongrel] Ajax and IE causing Page Not Found and 500 Errors behind SSL
> Hey Curtis, can you tell me the versions of your operating system, > Apache, Mongrel, and Ruby? Can''t really go on much without that. > > As for HTTP/1.1 -- Mongrel is an HTTP/1.1 only web server. There should > be no clients that claim to be 1.0 anymore, but Mongrel will accept > requests from them, it just doesn''t do much to support 1.0. Trying to > support both is really not worth the effort in order to support such a > tiny share of the servers out there. If you have 1.0 clients that > absolutely can''t be upgraded, then put Mongrel behind apache (like you > are) or Pound and have those proxy servers do the translation.Zed, Thanks for the quick reply. After logging the environment variables such as nokeepalive, I found that the BrowserMatch statement that I had wasn''t working because it was for the _default_:443 virtual host the environment variables weren''t being set properly. So I put another BrowserMatch ... inside the more specific virtual host and I was getting the downgrade to 1.0 effect I desired. My curl output now looks like this: HTTP/1.0 200 OK Date: Thu, 08 Jun 2006 18:02:40 GMT Server: Mongrel 0.3.12.4 Content-Length: 7176 Status: 200 OK Cache-Control: no-cache Content-Type: text/html Set-Cookie: _session_id=3952e4e54aa9dc3433dc0c030040a9cf; path=/ Vary: Accept-Encoding Connection: close when I simulate the IE user agent. Thanks, Curtis