perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Returning 304 Not Modified
Date Wed, 12 Apr 2006 18:22:59 GMT


Octavian Rasnita wrote:

> I have made a perl module that does:
> 
> 
> 
> my $status = $params->{r}->meets_conditions();
> 
> 
> 
> if ($status) {
> $params->{r}->custom_response($status, "Pagina nu a fost modificata");
> return;
> }
> 

that usage is wrong.  it should be

  if ((my $status = $r->meets_conditions) == OK) {
    # send content
  }
  else {
    return $status;
  }

although these are mp1 examples, you can find a few different approaches to
304 here

  http://www.modperlcookbook.org/code/ch06/Cookbook/

HTH

--Geoff

Mime
View raw message