Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed some problems about cached content with publisher feature and a…

…dded a bit more debugging on NotFound case
  • Loading branch information...
commit aa0a5ab9cec58642d6ec69e8b3cfd5c55c31f854 1 parent 647a4b0
@Getty Getty authored
View
4 lib/App/DuckPAN/Cmd/Publisher.pm
@@ -52,8 +52,8 @@ sub run {
},
);
- for (keys %sites) {
- print "Serving ".$sites{$_}->{url}." on ".$sites{$_}->{port}."\n";
+ for (sort { $sites{$a}->{port} <=> $sites{$b}->{port} } keys %sites) {
+ print "Serving on port ".$sites{$_}->{port}.": ".$sites{$_}->{url}."\n";
}
print "\n\n";
View
6 lib/App/DuckPAN/WebPublisher.pm
@@ -74,7 +74,7 @@ sub request {
if (defined $site->fullpath_files->{$file}) {
print 'Request '.$request->path_info.' uses '.$file.' from DDG::Publisher...'."\n";
- $body = $site->fullpath_files->{$file}->content;
+ $body = $site->fullpath_files->{$file}->uncached_content;
$response->code("200");
$response->content_type('text/html');
} else {
@@ -84,8 +84,8 @@ sub request {
$response->code($res->code);
$response->content_type($res->content_type);
} else {
- warn $res->status_line, "\n";
- $body = "";
+ $body = "GET ".$url.$request->request_uri.": ".$res->status_line;
+ warn $body, "\n";
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.