projects
/
catagits/Catalyst-Runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
1807fc2
)
Avoid 'print on closed filehandle' warnings from IE
Andy Grundman [Wed, 25 Oct 2006 15:20:54 +0000 (15:20 +0000)]
lib/Catalyst/Engine.pm
patch
|
blob
|
blame
|
history
lib/Catalyst/Engine/CGI.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Catalyst/Engine.pm
b/lib/Catalyst/Engine.pm
index
3a73c04
..
f075890
100644
(file)
--- a/
lib/Catalyst/Engine.pm
+++ b/
lib/Catalyst/Engine.pm
@@
-579,6
+579,8
@@
sub write {
$self->prepare_write($c);
$self->{_prepared_write} = 1;
}
+
+ return unless *STDOUT->opened();
print STDOUT $buffer;
}
diff --git
a/lib/Catalyst/Engine/CGI.pm
b/lib/Catalyst/Engine/CGI.pm
index
17e4eed
..
dbdfbbd
100644
(file)
--- a/
lib/Catalyst/Engine/CGI.pm
+++ b/
lib/Catalyst/Engine/CGI.pm
@@
-42,6
+42,8
@@
sub finalize_headers {
my ( $self, $c ) = @_;
$c->response->header( Status => $c->response->status );
+
+ return unless *STDOUT->opened();
print $c->response->headers->as_string("\015\012");
print "\015\012";