[z3-five] implementing IBrowserRequest not enough?

Jan-Wijbrand Kolman jw at infrae.com
Thu Mar 10 12:13:17 MET 2005


Hi,

A couple of questions...


While trying to understand the relationships in Zope-3's interfaces for 
requests, browser requests and application requests, I wondered if Five's 
declaration for Zope-2's HTTPRequest is correct and complete..:


   <!-- make Zope 2's REQUEST implement the right thing -->
   <five:implements
       class="ZPublisher.HTTPRequest.HTTPRequest"
       interface="zope.publisher.interfaces.browser.IBrowserRequest"
       />


Questions:

1) Does the Zope-2 HTTPRequest (including Five's monkey patch) indeed implement 
the whole IBrowserRequest interface? I'm not sure.

2) Should Five actually try to make the HTTPRequest implement IBrowserRequest 
*and* IBrowserApplicationRequest? Maybe not, because it might need too much 
monkeying?

However, the latter would make things like implementing 'virtual host aware' 
breadcrumbs in Five.browser.AbsoluteUrl easier. Because 
IBrowserApplicationRequest (or actually one of the interfaces it extends) 
defines things like 'getVirtualHostRoot'.

Or maybe I should just implement 'my own' IAbsoluteUrl for my application?


regards,
jw

-- 
Jan-Wijbrand Kolman
jw at infrae.com


More information about the z3-five mailing list