Sending compressed Web Service requests to Apache server

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: PerryG (PerryG_at_community.nospam)
Date: 12/15/04


Date: Wed, 15 Dec 2004 13:47:08 -0800

We have a .NET 1.1 client which is sending a gzipped soap request using
HttpWebRequest to an Apache server. The Apache server is using a the
'mod_deflate' server to decompress the incoming message, and to also compress
the response (GZIP).

The mod_deflate filter requires the 'Content-Length' header contained within
the incoming request to specify the number of UNCOMPRESSED bytes being sent
and not the actual bytes of the body of the compressed HTTP request itself.
The problem we have is .NET requires that you specify the number of actual
bytes written to the request stream as specified in the Content-Length header
of the request message. The exception we receive when attempting to close
the stream to send the request is:

    [System.IO.IOException]: {System.IO.IOException}
    HelpLink: Nothing
    InnerException: Nothing
    Message: "Cannot close stream until all bytes are written."
    Source: "System"
    StackTrace: " at System.Net.ConnectStream.CloseInternal(Boolean
internalCall, Boolean ignoreShutDownCheck)"
    TargetSite: {System.Reflection.RuntimeMethodInfo}

Is there any way around this issue?



Relevant Pages

  • Re: Some apache configuration problem
    ... the question is that I need a way to let Apache server to ... know what the time is when there is request coming. ... agent shows up between 3 AM and 9 PM, their request is rewritten to a ... RewriteCond %%<2100 ...
    (comp.infosystems.www.servers.unix)
  • how does the apache server and php interpreter handles request?
    ... I'm wondering how the apache server and php interepreter handles ... If one request comes to apache server what is next procedure? ... apache server forks 10 php ...
    (comp.lang.php)
  • RE: Sending compressed HTTP requests to Apache server:Content-Length I
    ... request, and receive the response. ... > HttpWebRequest to an Apache server. ... > 'mod_deflate' server to decompress the incoming message, ... > the incoming request to specify the number of UNCOMPRESSED bytes being sent ...
    (microsoft.public.dotnet.general)
  • Sending compressed HTTP requests to Apache server:Content-Length I
    ... We have a .NET 1.1 client which is sending a gzipped soap request using ... HttpWebRequest to an Apache server. ... The problem we have is .NET requires that you specify the number of actual ... bytes written to the request stream as specified in the Content-Length header ...
    (microsoft.public.dotnet.general)
  • Re: Strange Web Server Log Entries
    ... Ubuntu 7.04 AND My Laptop with Ubuntu 7.10 ... my client's untouched Default Apache server on Ubuntu 7.04 ... The server only servers static XHTML and CSS pages. ... "200 OK" on almost every proxy request, ...
    (Security-Basics)