Fun with headers

My PR team tells me that nobody reads Friday afternoon blog posts, so this seems like the perfect time to publish something that will only be interesting to a very small number of people (hello jad!  hello mnot!).

A customer asked me this morning how various CDN providers handle HTTP headers, so I ran a quick test against a handful of our largest global partners:

HTTP/1.x 200 OK
ChinaCache, Cloudfront, and Internap all returned 1.0. The rest returned 1.1

Accept-Encoding
Only CloudFlare, Cotendo, Edgecast, and Limelight included an Accept-Encoding header.

Accept-Ranges
Bitgravity, CDNetworks, ChinaCache, CloudFlare, Fastly, NetDNA did not include an Accept-Ranges header. The rest did.

Age
Only Azure, Bitgravity, CDNetworks, ChinaCache, Cloudfront, Fastly, and Limelight included an Age header in their response.

Cache-Control, Expires, Pragma

  • Azure, Cloudfront, Edgecast, NetDNA, and Yacast did not return any caching-related headers.
  • CDNetworks, ChinaCache, CloudFlare, Fastly, Level3, and Limelight all returned a 30 day TTL (max-age=2592000), along witht the appropriate Expires time (27 Nov 2011).
  • Akamai returned “max-age=0, no-cache, no-store” along with an Expires header and Pragma: no-cache.
  • Cotendo returned Cache-Control: no-store, Pragma: no-cache, and an Expires date older that most of my employees (01 Jan 1970).
  • Internap returned “max-age=3600, stale-if-error=3600” with no Expires header.
  • Highwinds returned “max-age=46923” with no Expires header.
  • Bitgravity returned “public,max-age=31536000” with no Expires header.

Connection
With the exception of Edgecast, everyone returned Connection: keep-alive. Highwinds and Yacast included a Keep-Alive: timeout header as well.

Content-Encoding & Content-Length
ChinaCache, CloudFlare, Cotendo, Edgecast, Fastly, Highwinds, Limelight, and NetDNA all gzip’d the file (resulting in a 146-147 byte content-length). Akamai, Azure, Bitgravity, CDNetworks, Cloudfront, Internap, Level3, and Yacast did not gzip the file (resulting in a 165 byte content-length). Cloudflare and NetDNA did not include a Content-Length header in their response.

Content-Type
Everyone returned application/x-javascript, except for Bitgravity (text/javascript) and Highwinds (application/javascript).

Date
Cloudfront returned ’25 Mar 2011′. The rest returned today (28 Oct 2011).

Etag
Only Azure, Bitgravity, Cloudfront, Edgecast, Highwinds, and Internap returned an Etag header.

Server
Highwinds did not include a Server header. Akamai, Cotendo, ChinaCache, Fastly, Level3, and Limelight returned “nginx” (ie, the Cedexis origin server). Others were all over the map:

  • Azure:: Microsoft-IIS/7.0
  • Bitgravity: bit_asic/3.8/r1s1-bitcast-b
  • CDNetworks: PWS/1.7.3.7
  • CloudFlare: cloudflare-nginx
  • Cloudfront: AmazonS3
  • Edgecast: ECS (sjo/5279)
  • Internap: Apache/2.0.55 (Ubuntu)
  • NetDNA: nginx/1.0.2
  • Yacast: nginx/0.8.21

Set-Cookie
Only Cloudflare sets its own cookies in the customer’s domain.

Via
Only Bitgravity, Cloudfront, Fastly, and Internap included Via headers.

X
A number of providers included their own proprietary HTTP headers:

  • Azure
    X-Powered-By: ASP.NET
  • CDNetworks
    X-Px: ht-d sea-ag1-n2.panthercdn.com
  • ChinaCache
    Powered-By-ChinaCache: HIT from USA-WA-1-3TC
  • CloudFlare
    CF-Cache-Status: HIT
  • Cloudfront
    X-Amz-Cf-Id:
    x-amz-id-2:
    x-amz-request-id: A02BB234BBD99EC5
    X-Cache: Hit from cloudfront
  • Edgecast
    X-Cache: HIT
    X-Powered-By: ASP.NET
  • Fastly
    X-Varnish: 1694751746 1670053507
  • Highwinds
    X-HW: 1319839399.cj005s1
  • Internap
    X-Cache: HIT from cdce-sef004-001.sef004.internap.com, MISS from cdce-sef004-002.sef004.internap.com
    X-Cache-Age: 1217
    X-Origin-Date: Wed, 15 Dec 2010 17:16:36 GMT

Have a nice weekend.