[Twisted-web] Possible bug in nevow.testutil.FakeRequest setHeaders and getHeaders

Peter Westlake peter.westlake at pobox.com
Wed Sep 29 10:57:06 EDT 2010

On Wed, 29 Sep 2010 13:00 +0000, exarkun at twistedmatrix.com wrote:
> On 12:48 pm, peter.westlake at pobox.com wrote:
> >  class FakeRequest(nevow.testutil.FakeRequest):
> >      def getResponseHeader(self, key):
> >          return self.headers.get(key.lower())
> >
> >Should I put in a ticket requesting something like this?
> Certainly.  Things are a little mixed up here though, let's see...
> Twisted Web provides a base Request class.  Nevow subclasses it to 
> create the request class all Nevow applications get.  Then Twisted Web 
> also provides a FakeRequest, which isn't very good, and I think there is 
> a ticket (in the Twisted tracker) for improving.  Then Nevow provides 
> its own FakeRequest, not a subclass of Twisted's FakeRequest.  There 
> probably needs to be a Nevow ticket for doing something about Nevow's 
> FakeRequest class - in the short term, fixing these minor issues; but in 
> the longer term, getting rid of it, and hopefully NevowRequest as well, 
> makes a lot of sense.

The ticket for set/getHeader is http://divmod.org/trac/ticket/3029.

Getting rid of NevowRequest and Nevow's FakeRequest presumably
means adding their extra functionality to the ones in Twisted Web,
so would that ticket go into Nevow, Twisted, or both?


More information about the Twisted-web mailing list