How to solve "Chunked body does not end properly with chunk of size 0"?

I have an RSS feed. When I view the feed with Fiddler Web Debugger open, Fiddler changes this error:

Chunked body did not terminate properly with 0-sized chunk.

      

The response from the server causing the error looks like this:

HTTP/1.1 200 OK
Date: Tue, 22 Jan 2013 21:00:49 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 30985

<rss version="2.0">
  <channel>
  ... etc

      

The owner of the RSS is reporting problems when trying to submit the site to the RSS aggregators.

I tried to check the rss here: http://validator.w3.org/appc/ . The answer was as follows:

IncompleteRead(30985 bytes read) (IncompleteRead; misconfigured server?)

      

However, if I go to rss and copy the code into this validator: http://validator.w3.org/appc/#validate_by_input then everything is validated correctly.

How to fix it? This is a C # ASP.NET Web Forms project running on .NET 3.5 in IIS6.

Update

It looks like I was using Fiddler incorrectly. After removing the Decode option, here is the server's response:

HTTP/1.1 200 OK
Date: Tue, 22 Jan 2013 21:22:03 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Transfer-Encoding: chunked
Cache-Control: private
Content-Type: text/xml; charset=utf-8

7909
<rss version="2.0">
  <channel>
   ... etc

      

+3


source to share


1 answer


The data posted above is not what the server sent. The response from the server contained the Transfer-Encoding: chunked HTTP header , but your data was not properly in the HTTP-chunked encoding format.

Please update your question with the actual data from Fiddler, making sure the Decode option in the Fiddler toolbar is NOT checked .



(As for the root cause of the problem, are you mistakenly calling Response.Close ()? See this article for an explanation of why the wrong way to complete an HTTP response is.)

+7


source







All Articles