Re: conditional get

2002-10-28 Thread Geoffrey Young
[snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R-status (). I'm using Apache::Registry, in case that makes any difference. Apache::Registry ignores the actual return code from your script, using instead the

Re: conditional get

2002-10-28 Thread Cristvo Dalla Costa
Geoffrey Young wrote: [snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R-status (). I'm using Apache::Registry, in case that makes any difference. if some online documentation says otherwise, please let us

Re: conditional get

2002-10-28 Thread Geoffrey Young
The doc on issuing correct http headers has returns with values all over it: http://perl.apache.org/docs/general/correct_headers/correct_headers.html the examples in that document assume that you're using mod_perl handlers, not Apache::Registry, though I admit that's not obvious unless you

Re: conditional get

2002-10-28 Thread darren chamberlain
* Cristvo Dalla Costa [EMAIL PROTECTED] [2002-10-25 20:29]: Hi, I'm trying to get my script to work with conditional get, however, when the browser should use the local copy it doesn't display anything, just telling me that the image's broken. The Eagle book implies that you need to use

Re: conditional get

2002-10-28 Thread Per Einar Ellefsen
At 15:47 28.10.2002, =?UTF-8?B?Q3Jpc3TDs3bDo28gRGFsbGEgQ29zdGE=?= wrote: Geoffrey Young wrote: [snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R-status (). I'm using Apache::Registry, in case that makes any

RE: conditional get

2002-10-28 Thread Kyle Oppenheim
So, try the following change to your code: $R-content_type ($data {mimetype}); $R-set_content_length ($data {size}); $R-header_out ('ETag',$data {md5}); don't do that. use the $r-set_etag method instead, which is probably a bit safer than trying to figure out Etag rules

Re: conditional get

2002-10-27 Thread Cristóvão Dalla Costa
Geoffrey Young wrote: Kyle Oppenheim wrote: $R-content_type ($data {mimetype}); $R-set_content_length ($data {size}); $R-header_out ('ETag',$data {md5}); don't do that. use the $r-set_etag method instead, which is probably a bit safer than trying to figure out Etag rules

Re: conditional get

2002-10-27 Thread Randy Kobes
On Sun, 27 Oct 2002, [ISO-8859-1] Cristóvão Dalla Costa wrote: Geoffrey Young wrote: Kyle Oppenheim wrote: $R-content_type ($data {mimetype}); $R-set_content_length ($data {size}); $R-header_out ('ETag',$data {md5}); don't do that. use the $r-set_etag method

Re: conditional get

2002-10-27 Thread Cristvo Dalla Costa
Randy Kobes wrote: You may want to take a look at http://perl.apache.org/docs/general/correct_headers/correct_headers.html where, like Geoff suggested, it is strongly advised to *not* use set_etag() for dynamic content. This page also discusses the Last-Modified, Expires, and Cache-Control

Re: conditional get

2002-10-26 Thread Geoffrey Young
Kyle Oppenheim wrote: I assume you are running this script under Apache::Registry (since your URLs have .pl extensions). Apache::Registry compiles your code into a subroutine and runs it using this code: my $old_status = $r-status; my $cv = \{$package\::handler}; eval { {$cv}($r,

RE: conditional get

2002-10-25 Thread Kyle Oppenheim
I assume you are running this script under Apache::Registry (since your URLs have .pl extensions). Apache::Registry compiles your code into a subroutine and runs it using this code: my $old_status = $r-status; my $cv = \{$package\::handler}; eval { {$cv}($r, @_) } if $r-seqno;