in reply to Order of HTTP request headers

One wonders, erm, why? The order is neither specified nor significant (apart from a general recommended ordering of header types), so why do you think it's of any use?

(Having said that, $r->headers_in returns an APR::Table instance rather than a true hash, and that class supports a method $tbl->do( $callback ) which iterates over the items in the table passing key/value paris to the callback (presumably in order as the APR::Table docs specifies keys are stored in the order added). That might get what you're looking for.)

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: Order of HTTP request headers
by kappa (Chaplain) on Oct 31, 2008 at 23:06 UTC
    We're trying to use the order of HTTP request headers as a factor in our antifraud system. We found out that our beloved bots send the headers in a distinctly different order than all current browsers.

    Thanks for the advice! Too bad our main system uses Apache 1.3 but we'll probably use the APR::Table in another place.

    --kap