logo       

Re: Referer/User-Agent patch for 1.3.0: msg#00052

web.lighttpd

Subject: Re: Referer/User-Agent patch for 1.3.0


On Sep 16, 2004, at 11:06 AM, Jan Kneschke wrote:

On Thu, Sep 16, 2004 at 10:58:32AM -0500, Matt Levine wrote:
Here's a patch to add support for $HTTP['referer'] and
$HTTP['UserAgent'] directives in conditional configs.

The usual warnings apply (ie: I don't really know what I'm doing)..
just a temporary fix..

I've been away from the list for a bit, has there been much discussing
about implementing/how best to handle http header matching? I'm
thinking something like this:

$HTTP['header']['Referer'] =
$HTTP['header']['User-Agent'] =


although that means all the modules would have to walk the headers hash
and pass each value to it's patch_connection function..

No, keep it simple.

$HTTP["referer"]
$HTTP["useragent"]

will be taken.

well, what if I want to match byte-ranges? or languages? or $some_other_http header? It seems a pain to have to repatch config.c and every single module everytime there's a new HTTP header somebody wants to match..

Wouldn't it be advantageous to have some structure that supports *any* http header somebody want to use to build a conditional config?

maybe $HEADERS["Referer"] ?




Unless we have it build an array of 'headers we care about' from the
config file, which is available to the plugins, and the plugins only
send the headers from that array to the patch_connection() function?

The idea of the patch is right, but the implementation seems to be
broken.

Broken how? .. it works for me ;)



Or have we all gone over this and already have a solution? IMAP isn't
fun sometimes ;)

I'll add a patch for your need with the above syntax.

Matt

Jan

--
Jan Kneschke http://jan.kneschke.de/
Perhaps you want to say 'thank you, jan': http://jk.123.org/wishlist/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise