X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=509585f218c4dcdc9814e0fa67ae24484945a2ea;hp=b5821031c490463c4086b1f93db4cbf94085cb4c;hb=671123ba662cd4d38ee2590baad2b9f46947cb4e;hpb=a160c98d29bf1df03934bd68da939e0b517dbb32 diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index b582103..509585f 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -311,6 +311,8 @@ Clean up after uploads, deleting temp files. sub finalize_uploads { my ( $self, $c ) = @_; + # N.B. This code is theoretically entirely unneeded due to ->cleanup(1) + # on the HTTP::Body object. my $request = $c->request; foreach my $key (keys %{ $request->uploads }) { my $upload = $request->uploads->{$key}; @@ -335,6 +337,7 @@ sub prepare_body { unless ( $request->_body ) { my $type = $request->header('Content-Type'); $request->_body(HTTP::Body->new( $type, $length )); + $request->_body->cleanup(1); # Make extra sure! $request->_body->tmpdir( $appclass->config->{uploadtmp} ) if exists $appclass->config->{uploadtmp}; } @@ -705,13 +708,13 @@ sub unescape_uri { =head2 $self->env -Hash containing enviroment variables including many special variables inserted +Hash containing environment variables including many special variables inserted by WWW server - like SERVER_*, REMOTE_*, HTTP_* ... -Before accesing enviroment variables consider whether the same information is +Before accessing environment variables consider whether the same information is not directly available via Catalyst objects $c->request, $c->engine ... -BEWARE: If you really need to access some enviroment variable from your Catalyst +BEWARE: If you really need to access some environment variable from your Catalyst application you should use $c->engine->env->{VARNAME} instead of $ENV{VARNAME}, as in some enviroments the %ENV hash does not contain what you would expect.