Better handling of fragment null string. Return chunked for errors in www_view.
This commit is contained in:
parent
8a448e8f96
commit
fff5bcfcd8
1 changed files with 3 additions and 1 deletions
|
|
@ -576,7 +576,7 @@ Any leftover part of the requested URL.
|
||||||
|
|
||||||
sub dispatch {
|
sub dispatch {
|
||||||
my ($self, $fragment) = @_;
|
my ($self, $fragment) = @_;
|
||||||
return undef if defined $fragment;
|
return undef if $fragment;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $state = $self->get('state');
|
my $state = $self->get('state');
|
||||||
##Only allow interaction with assets in certain states
|
##Only allow interaction with assets in certain states
|
||||||
|
|
@ -603,11 +603,13 @@ sub dispatch {
|
||||||
$output = eval { $self->www_view };
|
$output = eval { $self->www_view };
|
||||||
if (my $e = Exception::Class->caught('WebGUI::Error::ObjectNotFound::Template')) {
|
if (my $e = Exception::Class->caught('WebGUI::Error::ObjectNotFound::Template')) {
|
||||||
$session->log->error(sprintf "%s templateId: %s assetId: %s", $e->error, $e->templateId, $e->assetId);
|
$session->log->error(sprintf "%s templateId: %s assetId: %s", $e->error, $e->templateId, $e->assetId);
|
||||||
|
return "chunked";
|
||||||
}
|
}
|
||||||
elsif ($@) {
|
elsif ($@) {
|
||||||
warn "logged another warn: $@";
|
warn "logged another warn: $@";
|
||||||
my $message = $@;
|
my $message = $@;
|
||||||
$session->log->warn("Couldn't call method www_view on asset for url: ".$session->url->getRequestedUrl." Root cause: ".$@);
|
$session->log->warn("Couldn't call method www_view on asset for url: ".$session->url->getRequestedUrl." Root cause: ".$@);
|
||||||
|
return "chunked";
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue