Hi.
I've set up my system to move gradually over to mod_perl and been clearing hurdles for several weeks now -- things like Apache::DBI cached connections to mysql never timing out and eventually running mysql out of connections, strange sudden bogging-down of the server, and so on, and I've worked my way past them.
 
To implement this, I set up my server to treat scripts ending in .cgi as normal cgi scripts, and to treat scripts ending in .mp as mod_perl CGIs.
 
Now, however, I've hit a really annoying weirdness. I received reports from several users that they suddenly couldn't login. After some frustrating grilling of them (it's almost impossible to get useful information out of a user -- it always starts with 'Why is it broke?!?!' and helpful things like OS, browser, etc are like pulling teeth). I found out that they seemed almost universally to be using Netscrape or WebTV, with a Mozilla here and there and a single Opera. No IE users reported an error, which is why it apparently took weeks for me to know about this (I'd tested web design against multiple browsers but had no reason to suspect that HTTP header interpretation would work differently).
 
Well, it seems that there are strange headers being passed out with mod_perl, and mixed into them come carriage returns.
 
This is, of course, bad. Technically, IE is parsing the headers wrong, because it's sweeping mast the CRLFs like there's nothing wrong with them. NS and other browsers are parsing them correctly, and as a result, the Cookie information I'm setting up comes out in the body of the response, not the headers.
 
I'm not sure what to do about this, or why it's happening.
 
Below, I am including the headers both from the .mp mod_perl and the .cgi standard CGI. There is NO difference between these -- as a matter of fact, they even sharre teh same inode as rather thasn copying the file I simply hard linked it.
 
I've used c-style comments in this below. Such comments are not part of the headers, but are included to provide a clear delimiter between the two sets of headers and to add necessary comments. The 2\n\n\n\n15f\n part is particularly weird, but doesn't do anything because of the extra CRLF after the Client-Response-Num header.
 
/* response headers from mod_perl -- sessionID has been altered for security purposes */
Client-Date: Sat, 08 Jun 2002 21:02:11 GMT
Client-Response-Num: 1
 
Cookie: session=d1af22bd5dd71c2585be72b86e119212; domain=.gothic-classifieds.com; path=/; expires=Sat, 08-Jun-2002 22:02:11 GMT<br>
HTTP/1.1 200 OK
Date: Sat, 08 Jun 2002 21:02:11 GMT
Server: Apache/1.3.19 (Unix) mod_perl/1.25
Set-Cookie: session=d1af22bd5dd71c2585be72b86e119212; domain=.gothic-classifieds.com; path=/; expires=Sat, 08-Jun-2002 22:02:11 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1
 
 
 
 
15f
/* response headers from standard CGI */
Connection: close
Date: Sat, 08 Jun 2002 21:02:54 GMT
Server: Apache/1.3.19 (Unix) mod_perl/1.25
Content-Type: text/html; charset=ISO-8859-1
Client-Date: Sat, 08 Jun 2002 21:02:55 GMT
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Cookie: session=d1af22bd5dd71c2585be72b86e119212; domain=.gothic-classifieds.com; path=/; expires=Sat, 08-Jun-2002 22:02:55 GMT<br>
Link: <css/gc.css>; rel="stylesheet"
Set-Cookie: session=d1af22bd5dd71c2585be72b86e119212; domain=.gothic-classifieds.com; path=/; expires=Sat, 08-Jun-2002 22:02:55 GMT
Title: GC Login Successful: Redirecting
 
/* end examples */

Reply via email to