Code fails in ColdFusion 10, works in CF 8

We have these two templates
on  CF8 http://fullpartner2.com/reset.cfm and on
CF10 CF10 http://fullpartner6.com/reset.cfm

The code works on CF8 and returns garbage characters in "filecontent" on CF10

Any idea why?

Here is the complete SOAP envelope and code:

<cfset XMLpacket='<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pur="http://PurolatorServices.com/">
   <soap:Header/>
   <soap:Body>
      <pur:GetRates>
         <pur:request>
            <pur:Credentials>
                <pur:UserName>GreenPasture</pur:UserName>
                <pur:Password>puro1010</pur:Password>
                <pur:ClientID>4327415</pur:ClientID>
            </pur:Credentials>
            <pur:OrderNumber>Test Rate 1</pur:OrderNumber>
            <pur:Ref1>MyRef 001</pur:Ref1>
            <pur:Ref2>Note 001</pur:Ref2>
            <pur:ShipDate>2013-08-29T00:00:00</pur:ShipDate>
            <pur:ShipMethod>GROUND</pur:ShipMethod>
            <pur:SpecialServices>
               <pur:string>NOTIFYCONSIGNEE</pur:string>
               <pur:string>OSNR</pur:string>
            </pur:SpecialServices>
            <pur:BillingOption>PREPAID</pur:BillingOption>
            <pur:BillingAccount/>
            <pur:LabelType>NONE</pur:LabelType>
            <pur:ShipFromAddress>
               <pur:Name></pur:Name>
               <pur:Company>Green Pasture</pur:Company>
               <pur:Add1>416 East Fremont</pur:Add1>
               <pur:Add2></pur:Add2>
               <pur:City>O''Neill</pur:City>
               <pur:StateProv>NE</pur:StateProv>
               <pur:PostalCode>68763</pur:PostalCode>
               <pur:Country>US</pur:Country>
               <pur:Phone>402-858-4818 ext 1</pur:Phone>
               <pur:Email></pur:Email>
            </pur:ShipFromAddress>
            <pur:ShipToAddress>
               <pur:Name>A Test Person</pur:Name>
               <pur:Company></pur:Company>
               <pur:Add1>3011 Mission Hill Dr</pur:Add1>
               <pur:Add2></pur:Add2>
               <pur:City>Mississauga</pur:City>
               <pur:StateProv>ON</pur:StateProv>
               <pur:PostalCode>L5M 0B8</pur:PostalCode>
               <pur:Country>CA</pur:Country>
               <pur:Phone>555-555-5555</pur:Phone>
               <pur:Email></pur:Email>
            </pur:ShipToAddress>
            <pur:DeclaredValue>100</pur:DeclaredValue>
            <pur:Currency>USD</pur:Currency>
            <pur:Packages>
                  
               <pur:RequestPackage>
                  <pur:PackageID>Pkg-0001a</pur:PackageID>
                  <pur:WeightUOM>LB</pur:WeightUOM>
                  <pur:Weight> 1.0</pur:Weight>
                  <pur:DimensionUOM>IN</pur:DimensionUOM>
                         
                  <pur:DimL>11</pur:DimL>
                  <pur:DimW>10</pur:DimW>
                  <pur:DimH>9</pur:DimH>
               </pur:RequestPackage>
                  
            </pur:Packages>
            <pur:Items>
                  
               <pur:RequestItem>
                  <pur:SKU>12345x</pur:SKU>
                  <pur:CustomsDesc>brief description</pur:CustomsDesc>
                  <pur:ExtendedDesc>item description</pur:ExtendedDesc>
                  <pur:Quantity>1</pur:Quantity>
                  <pur:TotalValue>100</pur:TotalValue>
                  <pur:Currency>USD</pur:Currency>
                  <pur:CountryOfOrigin>US</pur:CountryOfOrigin>
                  <pur:HSCode></pur:HSCode>
                  <pur:NAFTAEligible>false</pur:NAFTAEligible>
                  <pur:FDAFood>false</pur:FDAFood>
                  <pur:Textile>false</pur:Textile>
               </pur:RequestItem>
            </pur:Items>
                  
         </pur:request>
      </pur:GetRates>
   </soap:Body>
</soap:Envelope>'>

      <cfset locals.URL="http://www.purolatorshipping.com/WebServices/ShippingServices.asmx?WSDL">
<cftry>
            
        <cfhttp url="#locals.URL#" port="80" method ="POST" throwonerror="yes" result="httpResponse">
                  <cfhttpparam type="Header" name="Accept-Encoding" Value="gzip,deflate">
                  <cfhttpparam type="Header" name="TE" value="gzip,deflate">
                  <cfhttpparam type="Header" name="Content-Length" value="#len(XMLPacket)#">
            <cfhttpparam name="name" type="XML" value="#XMLPacket#">
        </cfhttp>
            <cfcatch>
                  <cfdump var="#XMLpacket#">
                  <cfdump var="#cfcatch#">
                  <cfset locals.error=1>
            </cfcatch>
</cftry>
<cfif NOT ISDefined("locals.error")>
      <cfdump var="#httpResponse#">
</cfif>

Thanks

Ted
tednevelsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gurpreet Singh RandhawaCEOCommented:
Hi there Ted, I tested your code on all Environments, it seems to be a Bug, I tested on CF9,CF8,CF10 and it is actually showing garbage characters in CF10

Let me do bit of more Testing and I will be answer your query, Else you can log the Bug with Adobe
0
_agx_Commented:
The garbage characters are just the raw gzip response. You can see it in the response dump:

Responseheader       
        struct
        Cache-Control       private, max-age=0
        Connection       close
        Content-Encoding       gzip

Change accept-encoding to "*" and it decodes or deflates properly. See the comments by Dan for more details.


        <cfhttp url="#locals.URL#" port="80" method ="POST" throwonerror="yes" result="httpResponse">
                  <cfhttpparam type="Header" name="Accept-Encoding" Value="*">
                  <cfhttpparam type="Header" name="TE" value="deflate;q=0">
                  <cfhttpparam type="Header" name="Content-Length" value="#len(XMLPacket)#">
                 <cfhttpparam name="name" type="XML" value="#XMLPacket#">
        </cfhttp>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tednevelsAuthor Commented:
Thank you! excellent solution
0
Gurpreet Singh RandhawaCEOCommented:
Hi Agx, Really Man, I leaned something new Today,

Cheers
0
_agx_Commented:
> decodes or deflates properly.

Oops... I meant to type decompresses (ie inflates) properly :) .. but you got the gist.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.