lib/rsaml/binding/http_redirect.rb
# Encoding implementation for HTTP Redirect binding :
#  * Deflate
#  * Base 64
#  * URI encode
Encoding implementation for HTTP Redirect binding :
Deflate
Base 64
URI encode
Encoding implementation for HTTP Redirect binding : Deflate Base 64 URI encode
def encode(xml)
           Copying from http://en.wikipedia.org/wiki/Zlib :
             zlib compressed data is typically written with a gzip or a zlib wrapper.
             The wrapper encapsulates the raw DEFLATE data by adding a header and trailer.
             This provides stream identification and error detection that are not provided
             by the raw DEFLATE data.
           Which in human terms means, getting rid of the zlib container (header, trailer).
          CGI.escape(Base64.encode64(Zlib::Deflate.deflate(xml, 9)[2..-5]))
        end
def encode ( xml ) CGI . escape ( Base64 . encode64 ( Zlib :: Deflate . deflate ( xml , 9 ) [ 2 .. - 5 ] ) ) end
Encoding implementation for HTTP Redirect binding :
 Deflate
 Base 64
 URI encode
Encoding implementation for HTTP Redirect binding : Deflate Base 64 URI encode
# Per spec, DEFLATE, encode and escape the data, but what is this magic `2..-5`? # # Copying from http://en.wikipedia.org/wiki/Zlib : #   zlib compressed data is typically written with a gzip or a zlib wrapper. #   The wrapper encapsulates the raw DEFLATE data by adding a header and trailer. #   This provides stream identification and error detection that are not provided #   by the raw DEFLATE data. # # Which in human terms means, getting rid of the zlib container (header, trailer).
xml