commit - e845266448678a874b53e7f9e0d16988815c2c92
commit + c4caaee88e58b02fae4d446ceb99147ed9ed3b0e
blob - 384f347b929513263e880df54a09a6ba700b089e
blob + 1cd6efe44c6ea8dbe180763fb07be941aa580ec2
--- libexec/got-fetch-http/got-fetch-http.c
+++ libexec/got-fetch-http/got-fetch-http.c
#define MINIMUM(a, b) ((a) < (b) ? (a) : (b))
#define hasprfx(str, p) (strncasecmp(str, p, strlen(p)) == 0)
-#define DEBUG_HTTP 0
-
FILE *tmp;
static int verbose;
buf_drain(&bio->rbuf, linelen);
break;
}
-#if DEBUG_HTTP
- fprintf(stderr, "%s: %s\n", __func__, line);
-#endif
if (hasprfx(line, "content-type:")) {
cp = strchr(line, ':') + 1;
break;
}
-#if DEBUG_HTTP
- if (tmp)
- fwrite(buf, 1, r, tmp);
- /* fwrite(buf, 1, r, stderr); */
-#endif
ret += r;
buf += r;
bufsz -= r;
int https = 0;
int ch;
-#if !DEBUG_HTTP || defined(PROFILE)
+#ifndef PROFILE
if (pledge("stdio rpath inet dns unveil", NULL) == -1)
err(1, "pledge");
#endif
if (get_refs(https, host, port, path) == -1)
errx(1, "failed to get refs");
-#if DEBUG_HTTP
- tmp = fopen("/tmp/pck", "w");
-#endif
-
pfd.fd = 0;
pfd.events = POLLIN;
if (poll(&pfd, 1, INFTIM) == -1)