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: Chris Card <>
  • To: <>
  • Subject: RE: [OpenSAML] Unable to Decode message encoded by HTTPRedirectDeflateEncoder
  • Date: Sat, 5 Feb 2011 16:52:25 +0000
  • Importance: Normal

          >>> 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



Archive powered by MHonArc 2.6.16.

Top of Page