WebGUI::Session::Http should go away (#11647)
Move logic out of WebGUI::Session::HTTP and into WebGUI::Session::Response / ::Request; deprecate more functions; change references in core to use $session->response instead; fix tests that broke because of the change but not one that merely generate the deprecated warning because I want to know that the proxying of depricated methods is working. These can be changed later.
This commit is contained in:
parent
72bac90f93
commit
57d2dbed56
76 changed files with 581 additions and 358 deletions
|
|
@ -71,7 +71,7 @@ sub dispatch {
|
|||
if ($session->user->isVisitor
|
||||
&& !$session->request->ifModifiedSince($asset->getContentLastModified, $session->setting->get('maxCacheTimeout'))) {
|
||||
$session->response->status("304");
|
||||
$session->http->sendHeader;
|
||||
$session->response->sendHeader;
|
||||
return "chunked";
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ The content handler for this package.
|
|||
|
||||
sub handler {
|
||||
my ($session) = @_;
|
||||
my ($log, $http, $asset, $request, $config) = $session->quick(qw(errorHandler http asset request config));
|
||||
my ($log, $asset, $request, $config) = $session->quick(qw(errorHandler asset request config));
|
||||
my $output = "";
|
||||
if (my $perfLog = $log->performanceLogger) { #show performance indicators if required
|
||||
my $t = [Time::HiRes::gettimeofday()];
|
||||
|
|
@ -177,7 +177,7 @@ sub handler {
|
|||
$output = dispatch($session, getRequestedAssetUrl($session));
|
||||
}
|
||||
|
||||
my $filename = $http->getStreamedFile();
|
||||
my $filename = $session->response->getStreamedFile();
|
||||
if ((defined $filename) && ($config->get("enableStreamingUploads") eq "1")) {
|
||||
my $ct = guess_media_type($filename);
|
||||
my $oldContentType = $request->content_type($ct);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ The content handler for this package.
|
|||
sub handler {
|
||||
my $session = shift;
|
||||
if ($session->setting->get("specialState") eq "upgrading") {
|
||||
$session->http->sendHeader;
|
||||
$session->response->sendHeader;
|
||||
open my $fh, '<', $session->config->get('maintenancePage');
|
||||
my $output = do { local $/; <$fh> };
|
||||
close $fh;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue