Download raw body.
gotwebd: lower log priority of disconnections
On Wed, May 17, 2023 at 10:37:24AM +0200, Omar Polo wrote:
> On 2023/05/17 10:34:36 +0200, Omar Polo <op@omarpolo.com> wrote:
> > we're pretty loud when reporting write failures in fcgi socket (and
> > what these causes later, i.e. various GOT_ERR_CANCELLED.) While we
> > have to handle the disconnection and stop doing work, I don't really
> > see the point in logging these by default. A client that disconnects
> > earlier is not that of a big deal.
> >
> > So, diff below turns the log_warn("write failure") into log_debug, so
> > you can still see them when running with -v, and don't log the
> > GOT_ERR_CANCELLED that we use to signal our callers to stop.
> >
> > ok?
>
> Sorry, wrong diff attached, was a previous attempt that didn't kept
> the return -1 in got_output_blob_by_lines().
> @@ -901,8 +902,9 @@ got_output_blob_by_lines(struct template *tp, struct g
> free(line);
>
> if (err) {
> - log_warnx("%s: got_object_blob_getline failed: %s",
> - __func__, err->msg);
> + if (err->code == GOT_ERR_CANCELLED)
Should't the above line say != instead of == ?
> + log_warnx("%s: got_object_blob_getline failed: %s",
> + __func__, err->msg);
> return -1;
> }
> return 0;
gotwebd: lower log priority of disconnections