How to stop your RSS feed barf chunks

Thursday, 24 May 2007

How to stop your RSS feed barf chunks

When generating an RSS feed .Net appeared to be attempting to be chunking its transfer encoding - or at least that's what the header info was reporting. Consequently some RSS parsers were having problems with this ("Unable to read data from the transport connection"). Whether .net was actually chunking or not is however debatable (by default it should not be). Work around appears to be to simply amend the header to stop reporting chunking! i.e. response.AddHeader("Transfer-Encoding", ""); See this in action in output.repeater.cs.

.Net 2.0 has a nice "response.SendChunked = false;" but not .Net 1. but worth noting if chunking really is occurring. (more info on chunking )

No comments:

Subscribe to SequenceLabs