commit 655201dd7ad04bde7edbb5968c08d62a99d5fed6 from: Omar Polo via: Thomas Adam date: Mon Apr 29 12:22:32 2024 UTC got-notify-http: make unexpected EOF more useful commit - 4c2c912121116761d73fbb528b89d7dc65aa3d32 commit + 655201dd7ad04bde7edbb5968c08d62a99d5fed6 blob - 53deae6d51c200a7063d322e1b13f0166e65a244 blob + 6f5747749d175c80bca3160cdb394aa794025a19 --- gotd/libexec/got-notify-http/got-notify-http.c +++ gotd/libexec/got-notify-http/got-notify-http.c @@ -552,7 +552,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; @@ -683,7 +683,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; @@ -994,7 +994,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);