FU: Less verbose and cryptic error message on write error
This commit is contained in:
parent
48fe393d5f
commit
a7e9fa1866
2 changed files with 3 additions and 4 deletions
6
c/fcgi.c
6
c/fcgi.c
|
|
@ -417,7 +417,7 @@ static void fufcgi_flush(pTHX_ fufcgi *ctx) {
|
|||
hdr.type = FCGI_STDOUT;
|
||||
hdr.id = ctx->reqid;
|
||||
if (fufcgi_write_record(ctx, &hdr, ctx->buf) != FUFE_OK)
|
||||
croak("write error: %s", strerror(errno));
|
||||
croak("%s\n", strerror(errno));
|
||||
ctx->len = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -442,13 +442,13 @@ static void fufcgi_done(pTHX_ fufcgi *ctx) {
|
|||
hdr.type = FCGI_STDOUT;
|
||||
hdr.id = ctx->reqid;
|
||||
if (fufcgi_write_record(ctx, &hdr, ctx->buf) != FUFE_OK)
|
||||
croak("write error: %s", strerror(errno));
|
||||
croak("%s\n", strerror(errno));
|
||||
|
||||
memcpy(ctx->buf+8, "\0\0\0\0\0\0\0\0", 8); /* FCGI_REQUEST_COMPLETE */
|
||||
hdr.type = FCGI_END_REQUEST;
|
||||
hdr.len = 8;
|
||||
if (fufcgi_write_record(ctx, &hdr, ctx->buf) != FUFE_OK)
|
||||
croak("write error: %s", strerror(errno));
|
||||
croak("%s\n", strerror(errno));
|
||||
|
||||
ctx->reqid = ctx->len = ctx->off = 0;
|
||||
}
|
||||
|
|
|
|||
1
t/fcgi.t
1
t/fcgi.t
|
|
@ -180,7 +180,6 @@ 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