[Mono-dev] [PATCH] BUG in System.Web.HttpResponse

Miguel de Icaza miguel at ximian.com
Mon Mar 6 14:52:49 EST 2006


Hello,

> Which works fine in MS's Framework.  In Mono, however, it gives an error
> saying "CacheControl property only allows `public', `private' or
> no-cache, for different uses, use Response.AppendHeader".  First, this
> is an incompatibility with MS.  Secondly, Response.AddHeader calls
> Response.AppendHeader in Mono, which sets the CacheControl property,
> which throws this exception.  So there is a logic loop.  I propose the
> following change to the AppendHeader method, starting on line 419:

You have found an incompatibility, but the fix is not to remove the
check, but to change the code so it can cope with multiple options being
set on the Cache-Control header.

Your work around might work for you, but there are more interactions in
the code which I would not want to modify without having an updated test
suite.

See the tests in mcs/class/System.Web/Test/standalone/response

Please resubmit when you have a proper fix, with tests.

Miguel.



More information about the Mono-devel-list mailing list