[go: nahoru, domu]

Skip to content

Commit

Permalink
fix miscellaneous bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
i110 committed Nov 21, 2018
1 parent 332fecb commit b04aec2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/libh2o/http1client.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,12 @@ h2o_httpclient_body_cb on_head(h2o_httpclient_t *client, const char *errstr, int
} else {
printf("\n");
}
for (i = 0; i != num_headers; ++i)
printf("%.*s: %.*s\n", (int)headers[i].name->len, headers[i].name->base, (int)headers[i].value.len, headers[i].value.base);
for (i = 0; i != num_headers; ++i) {
const char *name = headers[i].orig_name;
if (name == NULL)
name = headers[i].name->base;
printf("%.*s: %.*s\n", (int)headers[i].name->len, name, (int)headers[i].value.len, headers[i].value.base);
}
printf("\n");

if (errstr == h2o_httpclient_error_is_eos) {
Expand Down Expand Up @@ -238,6 +242,8 @@ int main(int argc, char **argv)
h2o_multithread_receiver_t getaddr_receiver;
uint64_t io_timeout = 5000; /* 5 seconds */
h2o_httpclient_ctx_t ctx = {NULL, &getaddr_receiver, io_timeout, io_timeout, io_timeout};
ctx.max_buffer_size = SIZE_MAX;

int opt;

SSL_load_error_strings();
Expand Down

0 comments on commit b04aec2

Please sign in to comment.