IIS's compression scheme incompatible with CFHTTP

Today some of our sites that make CFHTTP calls to Protx's VSP Direct Server stopped working! The CFHTTP response I was getting back was "Connection Failure: Status code unavailable".

A quick search one the Net and I came across this post: Workaround for CFHTTP and Compressed HTTP Response from IIS.

Basically it's to do with the HTTP Compression in IIS. CFHTTP couldn't read the compressed header. This is due to IIS's compression scheme being incompatible with CFHTTP, so I have read.

The quick fix was to add the following CFHTTPPARAM to the CFHTTP post so the header is sent back uncompressed.


<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="Header" name="TE" value="deflate;q=0">

This resolved the problem, however this issue according to some other blog posts I read was resolved in MX7 Cumulative Hot Fix back in 9/10/2007, however I am running CF 8.01 maybe this needs addressing again?


Related Blog Entries

Comments
Steven Erat's Gravatar As far as I know, this was never something to be "fixed" in ColdFusion. The problem is that the webserver is zipping up the HTTP Response, and the headers just ask the webserver not to do that. At best, this would be an enhancement request for ColdFusion, to give it new functionality that automagically deflates compressed HTTP Responses when needed, and there's probably already an enhancement request in for this. You may want to check out a comprehensive article from Sami Hoda on (the now defunct) CFDJ archives (watch out for the popups): http://coldfusion.sys-con.com/node/345934
# Posted By Steven Erat | 05/12/08 17:42
Glyn Jackson's Gravatar Thanks for the link Steven Erat, and thanks for your blog post @ talkingtree, saved me hours of time trying to work out why! I just assumed that by default CF8 would tell IIS to get the content uncompressed as I am sure that's what the Hot Fix did for MX7 and the CFHTTP tag.
# Posted By Glyn Jackson | 05/12/08 18:26
Sami Hoda's Gravatar As far as I know, this was fixed in CF8. I had a an artifact during the alpha, and Tom Jordahl fixed it. However, to play it safe, I still keep this code to make sure CF properly understands zipped content. The problem was not only here, but in Scheduled Tasks, where if it was hitting a zipped response, would cause the scheduled task to fail. Let me know if you still see it in CF8.
# Posted By Sami Hoda | 06/12/08 04:10
Glyn Jackson's Gravatar still seeing the problem on 8.0.1
# Posted By Glyn Jackson | 06/12/08 12:23
 

About Me

Glyn Jackson, 26 years old, MD and youngest member of a web development firm based in Staffordshire called Newebia Ltd. Academic background in BSc Information System & Internet Commerce. Online marketing expert (EE Ranked) and .NET developer. Has been using ColdFusion for just 3 years but loves it. "I am not a veteran in ColdFusion but I do work on challenging projects which help me learn more about ColdFusion and if I can contribute to the community in anyway then, it's all good!"

Recommends

  • ColdFusion