--- AnyEvent-HTTP/HTTP.pm 2008/06/05 15:34:00 1.11 +++ AnyEvent-HTTP/HTTP.pm 2008/06/05 16:33:02 1.12 @@ -123,7 +123,9 @@ =item headers => hashref -The request headers to use. +The request headers to use. Currently, C may provide its +own C, C, C and C headers +and will provide defaults for C and C. =item timeout => $seconds @@ -183,12 +185,13 @@ =cut +sub _slot_schedule; sub _slot_schedule($) { my $host = shift; while ($CO_SLOT{$host}[0] < $MAX_PER_HOST) { if (my $cb = shift @{ $CO_SLOT{$host}[1] }) { - # somebody wnats that slot + # somebody wants that slot ++$CO_SLOT{$host}[0]; $cb->(AnyEvent::Util::guard { @@ -198,7 +201,6 @@ } else { # nobody wants the slot, maybe we can forget about it delete $CO_SLOT{$host} unless $CO_SLOT{$host}[0]; - warn "$host deleted" unless $CO_SLOT{$host}[0];#d# last; } } @@ -255,6 +257,8 @@ $upath =~ s%^/?%/%; + $hdr{referer} ||= "$scheme://$authority$upath"; + # cookie processing if (my $jar = $arg{cookie_jar}) { %$jar = () if $jar->{version} < 1;