Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev
updating r->finfo on $r->filename($newfile)
 

Index | Next | Previous | View Flat


geoff at modperlcookbook

Oct 27, 2003, 12:17 PM


Views: 2241
Permalink
updating r->finfo on $r->filename($newfile)

hi all

just following up on a thread in new-httpd from the weekend :)

in mp1, whenever a user set the filename via $r->filename($newfile) mod_perl
would update r->finfo as well. the reason is because things like
default_handler do this

ap_update_mtime(r, r->finfo.mtime);
...
ap_set_content_length(r, r->finfo.size);
if ((errstatus = ap_meets_conditions(r)) != OK) {
...

so, if a handler sets r->filename after translation, the wrong value will be
used in the meets_conditions test, and the client will get bad data.

the attached patch carries this over to mp2.

the only outstanding issue for me is that in mp1, there was an exception for
Win32, which I didn't carry over, figuring apr now takes care of the compat
issues. I'm also hoping that utime (used in the test suite) is portable :)
so, I'd like to get some feedback/test results from Win32 before porting
this functionality to mp2.

--Geoff
Attachments: filename.patch (7.28 KB)

Subject User Time
updating r->finfo on $r->filename($newfile) geoff at modperlcookbook Oct 27, 2003, 12:17 PM
    Re: updating r->finfo on $r->filename($newfile) stas at stason Oct 27, 2003, 11:59 AM
        Re: updating r->finfo on $r->filename($newfile) geoff at modperlcookbook Oct 27, 2003, 2:41 PM
            Re: updating r->finfo on $r->filename($newfile) stas at stason Oct 27, 2003, 3:02 PM
                Re: updating r->finfo on $r->filename($newfile) geoff at modperlcookbook Oct 27, 2003, 3:58 PM
                    Re: updating r->finfo on $r->filename($newfile) stas at stason Oct 27, 2003, 4:35 PM
                        Re: updating r->finfo on $r->filename($newfile) geoff at modperlcookbook Oct 27, 2003, 5:48 PM
                            Re: updating r->finfo on $r->filename($newfile) stas at stason Oct 27, 2003, 6:08 PM
                                Re: updating r->finfo on $r->filename($newfile) geoff at modperlcookbook Oct 28, 2003, 9:01 AM
                                    Re: updating r->finfo on $r->filename($newfile) stas at stason Oct 28, 2003, 11:25 AM
                                        Re: updating r->finfo on $r->filename($newfile) geoff at modperlcookbook Oct 28, 2003, 11:44 AM
                                            Re: updating r->finfo on $r->filename($newfile) stas at stason Oct 28, 2003, 12:51 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.