#441: Put product request handlers in the right context
-------------------------+-------------------------------------------------
  Reporter:  olemis      |      Owner:  olemis
      Type:  task        |     Status:  accepted
  Priority:  critical    |  Milestone:  Release 6
 Component:              |    Version:
  multiproduct           |   Keywords:  product environment request handler
Resolution:              |  bep-0003
-------------------------+-------------------------------------------------

Old description:

> This ticket encloses the following subtasks :
>
>   1. [=#item-1] Do not embed product dispatching loop inside the global
>      handler loop (as before) . Instead show a warning message
>      in ''HTTP 404 Not Found'' response .
>      * Embedding won't be needed in sub-domain deployments
>        as URL namespaces will not interfere
>      * [ticket:357 Environment factories] will put requests in the right
> context.
>   2. [=#item-2] Consider `[trac]` `default_handler` setting to choose
> product landing page.
>      Preload settings to make product dashboard view the default .
>   3. [=#item-3] Tweak environment factories
>      * Path match is not appropriate in sub-domain deployments

New description:

 This ticket encloses the following subtasks :

   1. [=#item-1] Do not embed product dispatching loop inside the global
      handler loop (as before) . Instead show a warning message
      in ''HTTP 404 Not Found'' response .
      * Embedding won't be needed in sub-domain deployments
        as URL namespaces will not interfere
      * [ticket:357 Environment factories] will put requests in the right
 context.
   2. [=#item-2] Consider `[trac]` `default_handler` setting to choose
 product landing page.
      Preload settings to make product dashboard view the default .
   3. [=#item-3] Tweak environment factories
      * Path match is not appropriate in sub-domain deployments
   4. Shift WSGI environment's URL path to the left
   5. Do not override environment's `abs_href`

--

Comment (by olemis):

 Replying to [comment:11 jure]:
 > Replying to [comment:10 olemis]:
 > > Replying to [comment:9 jure]:
 > > > Is there something missing in the patch queue for this ticket?
 Applying only `t441_r1461631_product_module_pathinfo.diff` removes
 `IRequestFilter` implementation from `ProductModule` causing all web
 requests targeted to `/products...` to fail.
 > >
 > > Isn't this handled by environment factories ? I mean , do requests
 sent to http://domain.tld/path/to/bh/env/products/... get intercepted by
 factories and consequently dispatched by product environment's request
 dispatcher ? If so then product module must not implement `IRequestFilter`
 ; else product module should be doing something ... depending on the
 answer maybe factories are not even needed after all .
 >
 > Environment factories intercept requests targeted at `/products...` and
 instantiate product environments/requests appropriately. This happens in
 `trac.web.main.dispatch_request`. Request processing from there on has not
 been changed, effectively processing is taking place in product context
 instead of global one...
 >

 Yes but WSGI environment is not properly setup afterwards .

 > > Do you think there is some value in simulating request processing from
 `trac.web.main.dispatch_request` ?
 >
 > If I understand this correctly you're suggesting that the logic from
 `IRequestFilter` is moved to `trac.web.main.dispatch_request` ?

 No . Should be moved to `MultiProductEnvironmentFactory` . I reviewed the
 code and there other subtle things TODO . Added in description .

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/441#comment:12>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to