Skip to content

Instantly share code, notes, and snippets.

@mnot
Created April 18, 2012 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnot/2414581 to your computer and use it in GitHub Desktop.
Save mnot/2414581 to your computer and use it in GitHub Desktop.
IIS Split date line - only on partial responses, one site
HTTP/1.1 206 Partial Content
Cache-Control: max-age=86400
Content-Type: text/css
Last-Modified: Mon, 15 Mar 2010 17:41:22 GMT
Accept-Ranges: bytes
ETag: "0cd3ba66c4ca1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Connection: Keep-Alive
Date: Wed, 18 Apr 2012 16:20
:54 GMT
Content-Length: 613
Content-Range: bytes 1-20/613
X-Via-Cache: RAMCACHE
XX-Via: RAMCACHE age(31169) hit(888)
@mnot
Copy link
Author

mnot commented Apr 18, 2012

This is a partial response from an Web site that shall remain nameless. Note how the Date line is split before the seconds; this makes the second half look like a new header that has no name (because it starts with a colon). That causes the HTTP parser in Thor to trip up; see mnot/thor#27.

Note that it's only on partial responses. I wonder what they're doing; it doesn't happen with any other IIS server I've tested. Maybe it's that "RAMCACHE" they seem to be using.

@mbelshe
Copy link

mbelshe commented Apr 18, 2012

Cool. Length-prefixed headers would not likely have this particular error :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment