On 5/3/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > On May 3, 2007, at 11:13 AM, kai wrote: > > Hi All, > > I'm tinkering with lighttpd and pylons and having a problem with my > > response headers being lowercased. > > response.headers['X-LIGHTTPD-send-file'] = '/Users/kai/Documents/ > > vimbook-OPL.pdf' > > > > But when I check the headers with wget/curl/firefox the header > > returned is > > x-lighttpd-send-file: /Users/kai/Documents/vimbook-OPL.pdf > > > > I'm currently digging around in paste and pylons source for an answer. > > This seems like a bug to me. But the rest > > of pylons and paste are so well thought out I thought maybe there was > > a good reason it is so. > > > > its pretty standard for case of headers to be normalized. HTTP > headers are case insensitive as per spec: > > http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 > > HTTP header fields, which include general-header (section 4.5), > request-header (section 5.3), response-header (section 6.2), and > entity-header (section 7.1) fields, follow the same generic format as > that given in Section 3.1 of RFC 822 [9]. Each header field consists > of a name followed by a colon (":") and the field value. Field names > are case-insensitive.
I like to embed secret information in my HTTP header names. I use upper case letters for 1 and lower case letters for 0, so by varying the case of the headers, I have an avenue for embedding extra information for the client. Browsers of course ignore this information. However, with just a bit of scripting, I can get the information out. The only problem is that sometimes I have to use additional headers to have enough "bandwidth" for the secret messages. Hmm, I wonder if can submit my standard to the IETF for its next April Fool's day RFC. /me giggles -jj -- http://jjinux.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
