From a7e9fa1866d70edab049b33893975701dd473f1d Mon Sep 17 00:00:00 2001 From: Yorhel Date: Mon, 5 Jan 2026 13:20:59 +0100 Subject: [PATCH] FU: Less verbose and cryptic error message on write error --- c/fcgi.c | 6 +++--- t/fcgi.t | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/c/fcgi.c b/c/fcgi.c index efcce6e..c7cf306 100644 --- a/c/fcgi.c +++ b/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; } diff --git a/t/fcgi.t b/t/fcgi.t index 85636e3..806182c 100644 --- a/t/fcgi.t +++ b/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;