RE: Sending compressed Web Service requests to Apache server

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

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


Date: Wed, 15 Dec 2004 23:45:01 -0800


"Steven Cheng[MSFT]" wrote:

> Hi Perry,
>
> Thanks for your posting. From your description, you're using the
> HttpWebREquest component in .net to send a certain compressed package
> (GZIP) to a service hosted on a apache web server. That service will
> decompress the package and send back a compressed response. The problem is
> that that service module need to get the actual length of the uncompressed
> package stream rather than the compressed length of the Content-Length in
> the httpwebrequest's request message, yes?
>
> As for the HttpWebRequest's ContentLength, i'm afraid this is a fixed
> behavior that we must set the value as the actual length of the binary
> stream in the Request stream rather than any other value. And this is
> defined by the standard http message. Are you sending the compressed
> package using the multi-part/form-data contenttype? If so, we can add some
> additional name/value fields into the http message body to represent the
> uncompressed package's size (or some other custom http headers) , but it
> all depend on the serverside's service module which may need to change the
> way it retrieve the package's actual size( not use the content-length of
> the http message).
>
> Please feel free to post here if you have any other ideas or concerns
> .Thanks.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
Your description of what we're trying to accomplish is correct.

As to your suggestion to send custom headers, that currently isn't an
option.

We did try experiementing with sending a chunked request since with chunked
requests, no content-length header needs to be specified. I'm able to send a
chunked request, the server receives it, but is not receiving the correct
'end transmission' marker/character from the .net client (sorry not sure what
the correct terminology is). It could be a compatiblity issue between .NET
and Apache, not sure. Any ideas on that one?



Relevant Pages

  • Re: Geolocation Testing
    ... "Andy" wrote: ... So you can't really spoof an IP address, but that is exactly what I ... that when your request comes in, the only piece of information available to ... spoof http requests to the current geolocation package that we have to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Question!
    ... Check to make sure the DP has the package ... Make sure your client computer is in the roaming boundaries of the ... > ContentAvailable ignoring update with no DPs for content request ID ...
    (microsoft.public.sms.admin)
  • Re: Geolocation Testing
    ... Well, let me ask you this, Peter: If I was to go out to some random ... that when your request comes in, the only piece of information available to ... spoof http requests to the current geolocation package that we have to ... location of a request to our servers. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Geolocation Testing
    ... spoof http requests to the current geolocation package that we have to ... "Hey, I just got a request from someone in Vegas", and then continue on ... location of a request to our servers. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ContentAvailable ignoring update with no DPs
    ... <![LOG[ContentAvailable ignoring update with no DPs for content request ID ... <![LOG[Policy is updated for Program: Adobe Acrobat Reader 6.01, Package: ... <![LOG[Attempting to retrieve default management point from ...
    (microsoft.public.sms.admin)