$r->filename, can I do this here ?
$r->filename, can I do this here ?
am 17.10.2008 09:19:55 von aw
Hi.
In a PerlFixupHandler, I want to use $r->filename to reset the target of
a PUT request, so as to "trick" the following Apache PUT content handler
into writing the PUT-ted file somewhere else than what the original URL
said.
What I am uncertain of, is whether I can (am allowed to ?) actually do
this in the PerlFixupHandler, considering all the steps Apache goes
through before to walk the original path etc..
Or if this opens any security or logical issues that I am unaware of etc..
I know that the path I am providing is correct and allowed, this is the
actual directory and filename where I want this file to land.
And I have done the AAA phases before, based on the original path and
that is OK also.
Thanks in advance,
André
Re: $r->filename, can I do this here ?
am 17.10.2008 09:53:20 von torsten.foertsch
On Fri 17 Oct 2008, Andr=E9 Warnier wrote:
> In a PerlFixupHandler, I want to use $r->filename to reset the target
> of a PUT request, so as to "trick" the following Apache PUT content
> handler into writing the PUT-ted file somewhere else than what the
> original URL said.
Yes you are allowed to do that. One thing you may have to consider is=20
the $r->finfo object (sort of stat() result). It is created in the core=20
maptostorage handler. So, if $r->filename is changed afterwards it is=20
out of sync. Don't know if your response handler uses it, probably not.
Torsten
=2D-
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net
Re: $r->filename, can I do this here ?
am 17.10.2008 11:07:28 von aw
Sorry, hit the reply button too quickly and didn't send it to the list..
Torsten Foertsch wrote:
> On Fri 17 Oct 2008, André Warnier wrote:
>> In a PerlFixupHandler, I want to use $r->filename to reset the target
>> of a PUT request, so as to "trick" the following Apache PUT content
>> handler into writing the PUT-ted file somewhere else than what the
>> original URL said.
>
> Yes you are allowed to do that. One thing you may have to consider is
> the $r->finfo object (sort of stat() result). It is created in the core
> maptostorage handler. So, if $r->filename is changed afterwards it is
> out of sync. Don't know if your response handler uses it, probably not.
>
Thanks.
I don't use $r->finfo.
But mod_dav is the content handler, and it may use the underlying Apache
information. Any way I can kind of "force" Apache to update it's
information after I call $r->filename, or does it already do that anyway ?
Re: $r->filename, can I do this here ?
am 17.10.2008 11:50:45 von torsten.foertsch
On Fri 17 Oct 2008, Andr=E9 Warnier wrote:
> Any way I can kind of "force" Apache to update it's
> information after I call $r->filename, or does it already do that
> anyway ?
See the example in
http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html# C_filename_
Torsten
=2D-
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net
Re: $r->filename, can I do this here ?
am 17.10.2008 13:36:58 von aw
Torsten Foertsch wrote:
> On Fri 17 Oct 2008, André Warnier wrote:
>> Any way I can kind of "force" Apache to update it's
>> information after I call $r->filename, or does it already do that
>> anyway ?
>
> See the example in
> http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html# C_filename_
>
Thanks again.
It is very clear in the doc, I just never thought of looking there..
Sorry.