Commit graph

4 commits

Author SHA1 Message Date
Scott Walters
7a994b59ce File assets should always give IO::File::WithPath objects to PSGI, instead of the current redirecting or streaming behavior. (#11688)
New API method:  WebGUI::Response::sendFile;  it, as appropriate, calls
setRedirect or setStreamedFile, depending on enableStreamingUploads config var.
setStreamedFile now kicks off the XSendfile process.
File.pm now uses this instead of trying to set both a redirect and a stream.
IO::File::WithPath blows up if a file doesn't exist so this raises an exception
now.
The http now no longer insist that '0' is not a valid filename to stream.
site.psgi, depending on enableStreamingUploads, enables either the Static
or XSendfile middleware.
2011-05-12 20:22:43 -04:00
Scott Walters
2d31f7234a PSGI entry points (#11632) -- add a plackMiddleware section to the config file; modify share/site.psgi to load from it.
This is minimal in implementation right now in that there's no support for passing args, which would generally be objects
mixed with strings, to the middlewares being added, as would be necessary if the .psgi files were to be largely migrated
to the config files.  I agree that it's important that upgrade scripts be able to add middleware (probably custom ones
that know how to get the session from %$env) but I'm not convinced of the utility of moving much logic out of
share/site.psgi.
2011-05-10 14:40:06 -04:00
Scott Walters
848570712e Basic tests for WebGUI::Middleware::StackTrace 2011-05-05 15:55:55 -04:00
Patrick Donelan
5c70ffb3e0 Minor improvements
Updated TODO
Enabled preloading
Added defaultPSGI to WebGUI::Paths
Added example of testing site via Plack::Test
2010-04-18 14:51:24 -04:00