Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the server supports HTTP compression at all, invariably it will support gzip, in which case it might compress the response and respond with the following response header:

...

As it turns out, SAML metadata is highly compressible., as illustrated below:

Code Block
languagebash
titleIllustrating HTTP compression with curl
$ url=http://md.incommon.org/InCommon/InCommon-metadata-preview.xml

$ curl --silent --head $url
verbose $url > /dev/null
* Connected to md.incommon.org (207.75.165.125) port 80 (#0)
> GET /InCommon/InCommon-metadata-preview.xml HTTP/1.1
> Host: md.incommon.org
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: FriSun, 1416 Apr 2017 2212:2925:2648 GMT
< Server: Apache
< Last-Modified: Fri, 14 Apr 2017 18:04:33 GMT
< ETag: "2926d4c-54d2446178bc5"
< Accept-Ranges: bytes
< Content-Length: 43150668
< Content-Type: application/samlmetadata+xml
< 
* Connection #0 to host md.incommon.org left intact

$ curl --silent --head --compressed $url
verbose --compressed $url > /dev/null
* Connected to md.incommon.org (207.75.165.125) port 80 (#0)
> GET /InCommon/InCommon-metadata-preview.xml HTTP/1.1
> Host: md.incommon.org
> User-Agent: curl/7.43.0
> Accept: */*
> Accept-Encoding: deflate, gzip
> 
< HTTP/1.1 200 OK
< Date: FriSun, 1416 Apr 2017 12:22:29:4543 GMT
< Server: Apache
< Last-Modified: Thu, 06 Apr 2017 19:50:04 GMT
< ETag: "7cf358-54c84d0b1266f"
< Accept-Ranges: bytes
< Content-Length: 8188760
< Content-Encoding: gzip
< Vary: Accept-Encoding
< Content-Type: application/samlmetadata+xml
< 
* Connection #0 to host md.incommon.org left intact

Shibboleth supports HTTP compression out of the box, with zero configuration. If you know of other metadata client software that supports HTTP compression, please add a comment to this page.