08b1be37724c83f2dab17f71b5494963f34180b7 braney Fri Apr 24 08:16:21 2020 -0700 expand the size of a buffer in net.c to 8k instead of 2000 diff --git src/lib/net.c src/lib/net.c index 4f8a5a5..9766bd0 100644 --- src/lib/net.c +++ src/lib/net.c @@ -1537,31 +1537,31 @@ } } } boolean netSkipHttpHeaderLinesWithRedirect(int sd, char *url, char **redirectedUrl) /* Skip http header lines. Return FALSE if there's a problem. * The input is a standard sd or fd descriptor. * This is meant to be able work even with a re-passable stream handle, * e.g. can pass it to the pipes routines, which means we can't * attach a linefile since filling its buffer reads in more than just the http header. * Handles 300, 301, 302, 303, 307, 308 http redirects by setting *redirectedUrl to * the new location. */ { -char buf[2000]; +char buf[8192]; char *line = buf; int maxbuf = sizeof(buf); int i=0; char c = ' '; int nread = 0; char *sep = NULL; char *headerName = NULL; char *headerVal = NULL; boolean redirect = FALSE; boolean byteRangeUsed = (strstr(url,";byterange=") != NULL); ssize_t byteRangeStart = -1; ssize_t byteRangeEnd = -1; boolean foundContentRange = FALSE; ssize_t contentRangeStart = -1; ssize_t contentRangeEnd = -1;