[Mono-list] XML-RPC listener produces exception on Mono, but works on .NET ("Cannot be changed after headers are sent")
alan.mcgovern at gmail.com
Tue Dec 18 17:03:52 EST 2007
Technically, you should write the headers before you write the content. That
means you need to set content type and all that *before* you write the
actual data to the response stream. I came across this one recently myself
and filed a bug:
Unfortunately it looks like the default MS.NET behavior is buggy, in that it
lets you set content type even though the headers are already sent and the
receiver will never see that new value.
On Dec 18, 2007 9:46 PM, Adam Tauno Williams <adam at morrison-ind.com> wrote:
> I've created an XML-RPC service using the CookComputing XML-RPC assembly
> as described at - http://www.cookcomputing.com/blog/archives/000572.html
> But it doesn't work [correctly] under Mono 1.2.6 whereas it does work
> in .NET. See -
> On Mono I get -
> Cannot be changed after headers are sent.
> at System.Net.HttpListenerResponse.set_ContentType (System.String
> value) [0x00039]
> in /tmp/monobuild/build/BUILD/mono-1.2.6
> System.String value) [0x00000] in
> at CookComputing.XmlRpc.XmlRpcHttpServerProtocol.HandleHttpRequest
> (IHttpRequest httpReq, IHttpResponse httpResp) [0x00000]
> - every time a request is processed, although the client does receive
> the response.
> The author of the XML-RPC assembly has verified that it works on .NET
> and fails on Mono, see -
> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list