matts 2003/07/16 02:01:11
Modified: lib AxKit.pm Log: Support http HEAD command Revision Changes Path 1.47 +6 -1 xml-axkit/lib/AxKit.pm Index: AxKit.pm =================================================================== RCS file: /home/cvs/xml-axkit/lib/AxKit.pm,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- AxKit.pm 16 Jul 2003 08:57:15 -0000 1.46 +++ AxKit.pm 16 Jul 2003 09:01:11 -0000 1.47 @@ -274,6 +274,7 @@ if ($r->notes('axkit_passthru')) { # slow passthru $r->send_http_header('text/xml'); + return DONE if $r->method eq 'HEAD'; eval { my $fh = $provider->get_fh; $r->send_fd($fh); @@ -339,6 +340,7 @@ AxKit::Debug(4, "[DECLINED] From: $E->{-file} : $E->{-line}"); $r->send_http_header('text/xml'); + return DONE if $r->method eq 'HEAD'; eval { my $fh = $provider->get_fh; $r->send_fd($fh); @@ -960,6 +962,7 @@ if ($AxKit::Cfg->DoGzip) { AxKit::Debug(4, 'Sending gzipped xml string to browser'); AxKit::Apache::send_http_header($r); + return DONE if $r->method eq 'HEAD'; if ($doit) { $r->print( unpack($]>5.00555?"U0A*":"A*", Compress::Zlib::memGzip( $transformer->( $r->pnotes('xml_string') ) @@ -971,6 +974,7 @@ } else { AxKit::Apache::send_http_header($r); + return DONE if $r->method eq 'HEAD'; if ($doit) { $r->print( $transformer->( $r->pnotes('xml_string') ) @@ -992,6 +996,7 @@ if ($E->isa('Apache::AxKit::Exception::IO')) { AxKit::Debug(1, "WARNING: Unable to write to AxCacheDir or .xmlstyle_cache"); AxKit::Apache::send_http_header($r); + return DONE if $r->method eq 'HEAD'; $r->print( $r->pnotes('xml_string') ); } else {