commit 8aebbd0a7057d6129ac03dd30732374167048488 from: Omar Polo date: Fri Apr 26 09:24:26 2024 UTC got-notify-http: make unexpected EOF more useful commit - a0769bb1e683876bd26ba4c2cc83e3e35db8111f commit + 8aebbd0a7057d6129ac03dd30732374167048488 blob - 1ee9998a747b22c9c1ab73f4b57c482bf2d573fd blob + 355860a4ba48913006fd6f5b8ea81ed2d3ab94b5 --- gotd/libexec/got-notify-http/got-notify-http.c +++ gotd/libexec/got-notify-http/got-notify-http.c @@ -550,7 +550,7 @@ jsonify_commit(FILE *fp, const char *repo, char **line if (ferror(stdin)) err(1, "getline"); if (!done) - errx(1, "unexpected EOF"); + errx(1, "%s: unexpected EOF", __func__); fputc('}', fp); return 0; @@ -681,7 +681,7 @@ jsonify_tag(FILE *fp, const char *repo, char **line, s if (ferror(stdin)) err(1, "getline"); if (!done) - errx(1, "unexpected EOF"); + errx(1, "%s: unexpected EOF", __func__); fputc('}', fp); return 0; @@ -986,7 +986,7 @@ main(int argc, char **argv) if (r == -1 && errno != EAGAIN) fatalx("bufio_read: %s", bufio_io_err(&bio)); if (r == 0) - fatalx("unexpected EOF"); + fatalx("unexpected EOF from upstream HTTP server"); for (;;) { line = buf_getdelim(&bio.rbuf, "\r\n", &len);