static int decode_headers_content(ODR o, int off, Z_HTTP_Header **headers,
char **content_buf, int *content_len)
{
static int decode_headers_content(ODR o, int off, Z_HTTP_Header **headers,
char **content_buf, int *content_len)
{
- /* we know buffer will be smaller than o->size - i - 2*/
- *content_buf = (char*) odr_malloc(o, o->size - i - 2);
+ /* we know buffer will be smaller than o->size - i*/
+ *content_buf = (char*) odr_malloc(o, o->size - i);
hr = (*p)->u.HTTP_Response = (Z_HTTP_Response *)
odr_malloc(o, sizeof(*hr));
hr = (*p)->u.HTTP_Response = (Z_HTTP_Response *)
odr_malloc(o, sizeof(*hr));
- fprintf(o->print, "-- HTTP response:\n%.*s\n", o->top - top0,
- o->buf + top0);
- fprintf(o->print, "-- \n");
+ odr_printf(o, "-- HTTP response:\n%.*s\n", o->top - top0,
+ o->buf + top0);
+ odr_printf(o, "-- \n");
- fprintf(o->print, "-- HTTP request:\n%.*s\n", o->top - top0,
+ odr_printf(o, "-- HTTP request:\n%.*s\n", o->top - top0,