Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Unable to Decode message encoded by HTTPRedirectDeflateEncoder

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Unable to Decode message encoded by HTTPRedirectDeflateEncoder


Chronological Thread 
  • From: John Gonzales <>
  • To:
  • Cc: Chris Card <>
  • Subject: Re: [OpenSAML] Unable to Decode message encoded by HTTPRedirectDeflateEncoder
  • Date: Sat, 05 Feb 2011 10:56:31 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=jcDJKEs7BCAFQ7M+ADD3GqFetpqnXbPhBz+Q9+1TVjXXNCeshH2x5wvrPyQGtMF+kK 1+nPtaLLrGr6AK0SDkflG6Jh/oZEljSY49RHoFokKHOW3BApoxjOdQXsc99gGM0ftpke UyX6BsZCobjKFMM9xzYmaBhLlm3Nd0mwTDQK8=

On 11-02-05 10:52 AM, Chris Card wrote:
          >>> On the Rails-end, all GET parameters are automatically URL-decoded. So all I
>>> need to do is Base64 Decode, then INFLATE. Here is my code that does this
>>> latter piece:
>>>
>>> Zlib::Inflate.inflate(Base64.decode64(message)
>>>
>>> message is the URL-decoded SAMLRequest GET parameter.
>>>
>>> Fairly simple, but then again, I'm not sure if I implemented the Java-end
>>> correctly. In any case, when my Ruby/Rails code executes, I get the error I
>>> mentioned above. For good measure, here it is once again:
>>>
>>> Zlib::DataError (incorrect header check):
>>> mylib/codecs.rb:19:in `inflate'
>>>
>>Do you have to do something like
>>Zlib::Inflate.new(-Zlib::MAX_WBITS).inflate(Base64.decode64(message)
>>?
>>(see e.g. http://www.agileweboperations.com/how-inflate-and-deflate-data-ruby-and-php)

>>Chris
>Wow. Thank you, Chris! I wish I would have asked sooner -- I would have saved myself 3 hours!

>I thought I gave the OpenSAML API and other SAML documentation (i.e., bindings, profiles, core, etc.) a good read, but I clearly missed something. So I am very curious, should/would I >have been able to pick this information up from either the two resources I just mentioned?
I doubt if it says anything in the SAML docs. The only reason I knew what to look for was that I've hit the same kind of problem myself before (in C++ using Boost, rather than ruby) so
I knew you needed to give Zlib some parameter to make it not expect headers.
Chris
Ah, well that makes sense then. I just sent another e-mail about it being implementation specific. And this furthers that point because Ruby's Zlib library is actually just calling the C library.

Well, thanks again! I'm glad you were around to point this out. I don't think I would have been able to find this out on my own, not in a reasonable amount of time at least.



Archive powered by MHonArc 2.6.16.

Top of Page