<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Paulo Morgado : HTTP</title><link>http://msmvps.com/blogs/paulomorgado/archive/tags/HTTP/default.aspx</link><description>Tags: HTTP</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Is it possible to compress a HTTP request?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/03/25/is-it-possible-to-compress-a-http-request.aspx</link><pubDate>Tue, 25 Mar 2008 01:44:26 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1552527</guid><dc:creator>Paulo Morgado</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/paulomorgado/rsscomments.aspx?PostID=1552527</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/paulomorgado/commentapi.aspx?PostID=1552527</wfw:comment><comments>http://msmvps.com/blogs/paulomorgado/archive/2008/03/25/is-it-possible-to-compress-a-http-request.aspx#comments</comments><description>&lt;p align="justify"&gt;Recently I was asked (related to my articles [&lt;a title="HTTP compression in the .NET Framework 1.1" href="http://www.codeproject.com/KB/aspnet/CompressibleHTTP.aspx" target="_blank"&gt;^&lt;/a&gt;] [&lt;a title="HTTP compression in .NET Framework 2.0" href="http://www.codeproject.com/KB/aspnet/CompressibleHTTP20.aspx" target="_blank"&gt;^&lt;/a&gt;] about HTTP compression) if it was possible to compress the contents of a web service call.&lt;/p&gt;  &lt;p align="justify"&gt;The way HTTP compression works (as far as I know) is by the client announcing to the server (using the &lt;strong&gt;accept-encondig&lt;/strong&gt; request HTTP header) what compression methods is capable of handling.&lt;/p&gt;  &lt;p align="justify"&gt;If the server is capable of using one of the accepted compression methods, compresses the response and specifies (using the &lt;strong&gt;content-encoding&lt;/strong&gt; HTTP response header) the compression method used.&lt;/p&gt;  &lt;p align="justify"&gt;The client usually doesn&amp;#39;t know if the server accepts any kind of encoding, so it shouldn&amp;#39;t impose any compression to the server.&lt;/p&gt;  &lt;p align="justify"&gt;One way to allow request compression and having the server handling it would be to send a &lt;strong&gt;content-encoding&lt;/strong&gt; HTTP header specifying the compression method of the request and having the server handling it and the &lt;strong&gt;BeginRequest&lt;/strong&gt; event by setting a &lt;strong&gt;HttpResponse.Filter&lt;/strong&gt; capable of uncompressing the request. This way it would be transparent to the request handling.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; I didn&amp;#39;t test this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1552527" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/paulomorgado/archive/tags/Web/default.aspx">Web</category><category domain="http://msmvps.com/blogs/paulomorgado/archive/tags/HTTP/default.aspx">HTTP</category></item></channel></rss>