You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by André Malo <nd...@perlig.de> on 2003/02/28 15:10:43 UTC

internal_fast_redirect question

Trying again ;-)

In contrast to a "normal" internal redirect the fast variant does an 
apr_table_overlay of the header tables of the original and the new request. 
Can someone explain, why? Why not using only the new header table? It bites 
us, for example, with cookies, which are set twice (mod_usertrack).

nd
-- 
package Hacker::Perl::Another::Just;print
qq~@{[reverse split/::/ =>__PACKAGE__]}~;

#  André Malo  #  http://pub.perlig.de  #

Re: internal_fast_redirect question

Posted by Greg Ames <gr...@apache.org>.
André Malo wrote:
> Trying again ;-)
> 
> In contrast to a "normal" internal redirect the fast variant does an 
> apr_table_overlay of the header tables of the original and the new request. 
> Can someone explain, why? Why not using only the new header table? It bites 
> us, for example, with cookies, which are set twice (mod_usertrack).

Sending cookies twice clearly sucks.  I don't know if we'd loose anything 
valuable by not sending the old headers.  Would there be another way to merge 
the tables that would eliminate the duplicate cookies?

Greg



Re: internal_fast_redirect question

Posted by André Malo <nd...@perlig.de>.
* William A. Rowe, Jr. wrote:

> At 08:10 AM 2/28/2003, André Malo wrote:
>>In contrast to a "normal" internal redirect the fast variant does an
>>apr_table_overlay of the header tables of the original and the new request.
>>Can someone explain, why? Why not using only the new header table? It bites
>>us, for example, with cookies, which are set twice (mod_usertrack).
> 
> Good question.  It's a bit historical.  Some of the headers are connection
> related, and fast internal redirect doesn't do all of the connection work that
> the full redirect would.  I'd need to step the code paths, but in the end, these
> two flavors should not differ so much.
> 
> It would be nice if we set up connection-oriented stuff at the start of the request
> in it's own table, duplicated that table for the request, and if a request does any
> sort of redirect, simply grab a fresh connection table.

If we are able to exactly define these headers, we can simply filter the 
assignment in fast_redirect. What about this option? (and who can define 
them? ;-)

nd
-- 
>kann mir jemand sagen, was genau @-Domains sind?
Ein Mythos. Ein Werbetrick. Verarsche. Nenn es wie du willst...

                 -- Alexandra Buss und Björn Höhrmann in dciwam

Re: internal_fast_redirect question

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 08:10 AM 2/28/2003, André Malo wrote:
>Trying again ;-)
>
>In contrast to a "normal" internal redirect the fast variant does an 
>apr_table_overlay of the header tables of the original and the new request. 
>Can someone explain, why? Why not using only the new header table? It bites 
>us, for example, with cookies, which are set twice (mod_usertrack).

Good question.  It's a bit historical.  Some of the headers are connection
related, and fast internal redirect doesn't do all of the connection work that
the full redirect would.  I'd need to step the code paths, but in the end, these
two flavors should not differ so much.

It would be nice if we set up connection-oriented stuff at the start of the request
in it's own table, duplicated that table for the request, and if a request does any
sort of redirect, simply grab a fresh connection table.

Recognize there are some bits that are preserved with fast internal redirects
that won't be computed again.  But I'd really like to see, after all of the 
optimizations that exist in dir_walk and friends, if fast_internal has any
remaining performance benefit.  If it's negligible, I'd be strongly +1 for finally
axing this oddball that was introduced back in mod_negotiation in Apache 1.3.

The behavior existed before it was in the core, that's how negotiation handled
multiviews.  One of my first projects was to rip it from negotiation, expose it, 
and clean it up for consistency.  It's been a long while since I revisited it.

Bill