Re: Inlining HTTP Headers in URLs

From: Nate Vack <njvack_at_nyob>
Date: Tue, 1 Jun 2010 13:47:39 -0500
To: CODE4LIB_at_LISTSERV.ND.EDU
On Tue, Jun 1, 2010 at 1:21 PM, LeVan,Ralph <levan_at_oclc.org> wrote:
> I've been sensing a flaw in HTTP for some time now.  It seems like you
> ought to be able to do everything through a URL that you can using a
> complete interface to HTTP.  Specifically, I'd love to be able to
> specify values for HTTP headers in a URL.

No, you shouldn't. HTTP headers and the URL string are for completely
different purposes.

You can certainly do similar things with headers and URI components
(for example, a client could use either to specify what content type
it expects, or language preferences) but the uses don't overlap much.

Think: do you really want clients specifying Referer: or
Cache-control: as URL parameters? It's not that it'd be harmful,
just... odd.

For debugging your requests, something like LiveHTTPHeaders or Fiddler
is almost certainly cleaner.

Cheers,
-Nate
Received on Tue Jun 01 2010 - 14:50:32 EDT