Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev
Odd header-handling behavior of zope.publisher.http.HTTPRequest
 

Index | Next | Previous | View Flat


jim at zope

Jun 6, 2009, 10:06 AM


Views: 259
Permalink
Odd header-handling behavior of zope.publisher.http.HTTPRequest

I'll start by saying this is my fault. :(

The HTTPRequest.getHeader method will return any environment variable,
not just headers. I expect this was a lazy way to handle the odd-ball
headers, content-type and content-length (envirnment variables
CONTENT_TYPE and CONTENT_LENGTH), which don't have an "HTTP_" prefix
in the environment. I think this implementation is rather lame.
What's worse, it has a test, testHeader that actually tests the
lamosity.

I suggest we switch to a tighter behavior. I'd be wildly surprised
and disappointed if any apps depended on the lose behavior. If no one
objects, I'll file an issue. (I don't think there's anything urgent
about this.)

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Subject User Time
Odd header-handling behavior of zope.publisher.http.HTTPRequest jim at zope Jun 6, 2009, 10:06 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.