#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
> 4. Shift WSGI environment's URL path to the left
> 5. Do not override environment's `abs_href`
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 (see comment:7 )
* 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. [=#item-4] Shift WSGI environment's URL path to the left (see
comment:13)
5. [=#item-5] '''TBD''' Do not override environment's `abs_href`
--
Comment (by olemis):
Replying to [comment:12 olemis]:
> Replying to [comment:11 jure]:
> > Replying to [comment:10 olemis]:
[...]
>
> > > Do you think there is some value in simulating request processing
from `trac.web.main.dispatch_request` ?
> >
I'd rather say this would be nice ... but in practice this is hard to test
with our existing testing approaches . We'll need functional test cases so
this is a target for #387
> > 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 .
Please review [attachment:t441_r1463560_product_envfactory.part1.diff
attached patch] for [#item-4 WSGI env setup] . [comment:7 Patch order]
updated accordingly . That should fix request handling issues , though
it's untested for the reasons explained above .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/441#comment:13>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker