O
O
Oleg Matrozov2013-04-07 10:23:20
Microsoft
Oleg Matrozov, 2013-04-07 10:23:20

IIS 7.0 bug, check?

I came across a bug in IIS 7.0. With the following correct php code, IIS incorrectly processes the response (changing it), resulting in invalid content being sent to the browser.
PHP file example:

<?php
  header('Location: http://ya.ru');
  header('Content-Length: 0');
?>

When requested in telnet, we will see the following response:
HTTP/1.1 302 Moved Temporarily
Location: http://ya.ru
Content-Length: 0
Server: Microsoft-IIS/7.0

<head><title>Документ перемещен</title></head>
<body><h1>Объект перемещен</h1>Документ теперь находится <a HREF="http://ya.ru">здесь</a></body>

Those. IIS added its response without modifying this Content-Length header.
Am I dreaming this?
Anyone willing to test this behavior on a similar and more recent version of IIS?
Tell me, where can I report?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Amnet, 2013-04-07
@Amnet

You can report a possible bug in Microsoft products here: connect.microsoft.com
Unfortunately, I can't suggest anything about the problem itself, since I'm not familiar with the subject.

S
shai_hulud, 2013-04-07
@shai_hulud

Almost all response and query rewrites in IIS are done by modules. I advise you to look in the Modules of the website and disable everything that is not related to fast-cgi.
And yet, it overwrites the body according to the status code (302), and most likely does not fill in the content-length and, accordingly, does not overwrite yours.

M
MT, 2013-04-07
@MTonly

Try to add a directive with the attribute to the section configuration → system.webServerin the file web.configin the root of the public directory of the site , which prohibits the output of the web server's own page depending on the HTTP status and instructs to display the response as is:httpErrorsexistingResponse="PassThrough"

<httpErrors existingResponse="PassThrough" />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question