if ( ref $c->response->body && $c->response->body->can('read') ) {
while ( !$c->response->body->eof() ) {
$c->response->body->read( my $buffer, $CHUNKSIZE );
- $self->write( $c, $buffer );
+ last unless $self->write( $c, $buffer );
}
$c->response->body->close();
}
push @cookies, $cookie->as_string;
}
- if (@cookies) {
- $c->res->headers->push_header( 'Set-Cookie' => join ',', @cookies );
+ for my $cookie (@cookies) {
+ $c->res->headers->push_header( 'Set-Cookie' => $cookie );
}
}
# For pretty dumps
local $Data::Dumper::Terse = 1;
$error = join '',
- map { '<code class="error">' . encode_entities($_) . '</code>' }
+ map { '<p><code class="error">' . encode_entities($_) . '</code></p>' }
@{ $c->error };
$error ||= 'No output';
$title = $name = "$name on Catalyst $Catalyst::VERSION";
+ $name = "<h1>$name</h1>";
# Don't show context in the dump
delete $c->req->{_context};
my $name = $dump->[0];
my $value = encode_entities( Dumper $dump->[1] );
push @infos, sprintf <<"EOF", $name, $value;
-<div>
- <b><u>
- <a href="#" onclick="toggleDump('dump_$i'); return false">%s</a>
- </u></b>
-</div>
-<br/>
+<h2><a href="#" onclick="toggleDump('dump_$i'); return false">%s</a></h2>
<div id="dump_$i">
<pre>%s</pre>
</div>
color: #ddd;
}
div.box {
+ position: relative;
background-color: #ccc;
border: 1px solid #aaa;
padding: 4px;
overflow: auto;
white-space: pre;
}
+ div.name h1, div.error p {
+ margin: 0;
+ }
+ h2 {
+ margin-top: 0;
+ margin-bottom: 10px;
+ font-size: medium;
+ font-weight: bold;
+ text-decoration: underline;
+ }
+ h1 {
+ font-size: medium;
+ font-weight: normal;
+ }
</style>
</head>
<body>