views:

93

answers:

1

Hello,

I'm using IIS 7 as web server for my application. If I enable dynamic content compression in the server, will this also enable clients to send compressed data to the server, if they can?

I mean, my application uses SOAP webservices, and clients usually send large chunks of data to the server. The clients are written in C#/.NET. Is there any kind of configuration I can do in a web reference / serice reference in order to tell them to compress the content before they send it to IIS? And do I have to do any kind of configuration in IIS in order for this to work?

Thanks in advance

+2  A: 

HTTP compression works by the client specifying an Accept-Encoding header with the compression types it accepts:

Accept-Encoding: compress, gzip

The server then sees this and will chose one of the encoding types based on the accept encoding rules defined here. The response will be in one of the accepted values or the identity encoding.


Requests:

In general a request can't come in compressed first because the communication starts with a request. An HTTP client could send an options request though and use that if you have control of the client and server source code you could do this.

The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.

An example of this is an apache module for SVN, and also an svn client. They can be configured to do HTTP compression on the request data.

See RFC 2616: Section 9

Brian R. Bondy
It turned out that I was wrong, in the sense that data transfer isn't my application's bottleneck. So, I decided not to worry much about sending compressed requests. But thanks for the useful answer.
lgomide