FastCGI: Improve handling of EPIPE while writing response
That would previously result in the worker getting killed with SIGPIPE. Which works, but we can also recover from that error without restarting the process.
This commit is contained in:
parent
d300f4d791
commit
48fe393d5f
4 changed files with 34 additions and 15 deletions
8
t/fcgi.t
8
t/fcgi.t
|
|
@ -54,6 +54,11 @@ start;
|
|||
begin 1, 2;
|
||||
record 1, 4, "";
|
||||
|
||||
start;
|
||||
begin 3, 2, 1;
|
||||
$remote->close;
|
||||
iserr -8;
|
||||
|
||||
start;
|
||||
begin 3, 2, 1;
|
||||
begin 1, 1, 1;
|
||||
|
|
@ -173,6 +178,9 @@ record 1, 4, "\x13\x01HTTP_CONTENT_LENGTH3\x0e\x01CONTENT_LENGTH0\x13\x01HTTP_CO
|
|||
record 1, 4, "";
|
||||
record 1, 5, "";
|
||||
isrec {'content-length','0'}, {body => ''};
|
||||
$remote->close;
|
||||
ok !eval { $f->flush; 1 };
|
||||
like $@, qr/write error/;
|
||||
|
||||
start;
|
||||
begin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue