On Fri, Aug 29, 2008 at 3:31 PM, Kevin Brown <[EMAIL PROTECTED]> wrote:
>> We need rewriting to plug into both gadgets/makeRequest and
>> gadgets/ifr, apparently.  Are there other places?  How should we plug
>> them in?
>>
>
> That's what the rewriting interface is for.
>
> There are a couple of other threads going discussing the rewriter.
>
> The best place to do rewriting is going to be in the place where we have all
> the needed context for doing it. That means:
>
> - In GadgetRenderingTask (soon to be "Renderer"), for rewriting gadgets.
> - In MakeRequestHandler, for makeRequest.
> - In ProxyHandler, for the open proxy.
>
> The last two might be able to get rolled into ProxyBase, but that's unlikely
> since makeRequest and proxied requests are substantially different.
>
> When you're doing the rewriter at the HTTP request level, it requires
> pulling in a ton of context way down deep into the stack. That doesn't work
> for many reasons.

Ah, I see what you're getting at, and it sounds fine to me.

What I'm mostly interested in is that rewriting stays independent from
how the data is fetched.  We should be able to rewrite responses in
the same way no matter whether it was a response to a signed request,
an OAuth request, or a request sent via carrier pigeon and magic bus.

Note that *caching* is not independent of those variables, however.
We need different cache policies for different types of requests.

Reply via email to