summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6ee0d7c)
Use the stream write instead of odr_printf which has a 4K tmp buffer.
static void dump_http_package(ODR o, const char *buf, size_t len)
{
static void dump_http_package(ODR o, const char *buf, size_t len)
{
for (i = 0; ; i++)
{
if (i == len)
{
for (i = 0; ; i++)
{
if (i == len)
{
+ o->op->stream_write(o, o->op->print, ODR_VISIBLESTRING, buf, i);
odr_printf(o, "%.*s\n", i, buf);
break;
}
odr_printf(o, "%.*s\n", i, buf);
break;
}
- odr_printf(o, "%.*s\n", i, buf);
- odr_printf(o, "(truncated\n", (long) len);
+ o->op->stream_write(o, o->op->print, ODR_VISIBLESTRING, buf, i);
+ odr_printf(o, "(truncated from %ld to %d\n", (long) len, i);
break;
}
else if (buf[i] == 0)
{
break;
}
else if (buf[i] == 0)
{
- odr_printf(o, "%.*s\n", i, buf);
+ o->op->stream_write(o, o->op->print, ODR_VISIBLESTRING, buf, i);
odr_printf(o, "(binary data)\n", (long) len);
break;
}
odr_printf(o, "(binary data)\n", (long) len);
break;
}