Setting Content-Length Header for HTTP 204?

E

Eric

Hello,

Can someone help out with forcing the Content-Length header to 0 when
returning an HTTP 204 with NO body (working in a WSE2.0 web service) I can't
seem to gain access to the Content-Length Header

I'm trying the following:
HttpResponse httpResponse = Context.Response;
httpResponse.AppendHeader("Content-Length", z.ToString());
httpResponse.StatusCode = i;
httpResponse.Flush();
Seems that there is an override behavior somewhere outside of the WebMethod
that is stripping out the content-Length header.

-thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top