3

I am using Fiddler to monitor calls to our ServiceStack API and I am seeing a comma in the Content-Length field. I am only seeing this when I deploy to a specific Windows server. What does that mean?

Content-Length: 611,0

The entire response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 611,0
Content-Type: text/plain
ETag: 635102562728230000
Server: Microsoft-IIS/8.0
X-Powered-By: ServiceStack/3.955 Win32NT/.NET
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: Content-Type
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 24 Jul 2013 19:03:34 GMT

raw data removed but it is 611 characters

I did not think commas in the Content-Length field were allowed.

kampsj
  • 3,139
  • 5
  • 34
  • 56

1 Answers1

5

It's likely because there were two Content-Length header fields, one with the value "611", the other one "0", and something has merged them into a single field value.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98
  • This has turned out to be the case. Your answer helped me re-think the problem. I was setting the Content-Length header once and then under the hood the ServiceStack core was setting the content-header to Zero because I returned a null in the Service implementation. Then the two values were getting merged into one comma separated header value. – kampsj Jul 25 '13 at 23:44
  • Another link on multiple header fields that helped me. http://stackoverflow.com/q/3096888/215502 – kampsj Jul 25 '13 at 23:45