Author Topic: \r\n - CRLF too much in http response  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

Offline bfrank

  • Pre-Newbie
  • Posts: 2
    • View Profile
\r\n - CRLF too much in http response
« on: May 26, 2008, 06:42:00 PM »
Hi I got a problem with 4images on my IIS with FastCGI installed:

when I make a request to http://localhost/captcha.php i get a red cross in IE.
Internet Explorer is having problems to show the image.
I drilled down and looked into the http response with the wfetch tool.
->I see that in the response right before the image is sent back a see 2 times a "\r\n" (see below)
one is ok as this signals in http that the payload (the image) should begin - however the image starts with another "\r\n" confusing the browser
...
Date: Mon, 26 May 2008 16:37:24 GMT\r\n
Content-Length: 4940\r\n
\r\n
\r\n
 ╪ α\x000\x010JFIF\x000\x001\x001\x000\x000\x001\x000\x001\x000\x000 ■\x000>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality\n...

however I found that the duplicate "\r\n" is also sent when requesting the index.php (however the response is text/html and the browser does display it quite fine.)

every page that includes the global.php shows the same problem. A simple <?php phpinfo(); ?> does not show the error (so my php config should be fine)

what is wrong? any ideas?

thanks,
Bernhard

Offline bfrank

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: \r\n - CRLF too much in http response
« Reply #1 on: June 10, 2008, 09:50:49 AM »
hi - I found the reason:

I had 2 carriage returns after "... ?>" tag in my config.php -> I removed those -> problem gone.

thanks,
Bernhard