matoit1 / skipfish

Automatically exported from code.google.com/p/skipfish
Apache License 2.0
0 stars 0 forks source link

Wrong Status Code in HTTP-Trace #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes, the Status Code in the HTTP-Trace is wrong, it outputs 200 instead 
of 206.

Example:

=== REQUEST ===

GET /Installation/ HTTP/1.1
Host: localhost:30013
Accept-Encoding: gzip
Connection: keep-alive
User-Agent: Mozilla/5.0 SF/1.69b
Range: bytes=0-199999
Referer: http://localhost/

=== RESPONSE ===

HTTP/1.1 200 Partial Content
Date: Fri, 22 Oct 2010 14:22:44 GMT
Server: Apache/1.3.29 (Win32)
Last-Modified: Fri, 27 Aug 2010 14:24:16 GMT
ETag: "0-f3-4c77ca90"
Accept-Ranges: bytes
Content-Length: 243
Content-Range: bytes 0-242/243
Keep-Alive: timeout=15, max=89
Connection: Keep-Alive
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Meine tolle Testseite</title>
    </head>
    <body>
        <h1>Meine tolle Testseite</h1>
    </body>
</html>
=== END OF DATA ===

Real Answer by Apache (output from Telnet, c/p of the request from above)

HTTP/1.1 206 Partial Content
Date: Fri, 22 Oct 2010 14:20:52 GMT
Server: Apache/1.3.29 (Win32)
Last-Modified: Fri, 27 Aug 2010 14:24:16 GMT
ETag: "0-f3-4c77ca90"
Accept-Ranges: bytes
Content-Length: 243
Content-Range: bytes 0-242/243
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Meine tolle Testseite</title>
    </head>
    <body>
        <h1>Meine tolle Testseite</h1>
    </body>
</html>

Original issue reported on code.google.com by tornh...@gmail.com on 22 Oct 2010 at 2:23

GoogleCodeExporter commented 9 years ago
That's by design, because many servers respond with 206 codes in a somewhat 
inconsistent manner. Is this interfering with your planned use in any way? If 
yes, let me know how.

Original comment by lcam...@gmail.com on 22 Oct 2010 at 4:22