uloop_timeout_cancel(&p->timeout);
uh_http_header(cl, cl->dispatch.proc.status_code, cl->dispatch.proc.status_msg);
blob_for_each_attr(cur, cl->dispatch.proc.hdr.head, rem)
- ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur), blobmsg_data(cur));
+ ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur),
+ blobmsg_get_string(cur));
ustream_printf(cl->us, "\r\n");
}
ustream_printf(cl->us, "Access-Control-Allow-Origin: %s\r\n",
- blobmsg_data(tb[HDR_ORIGIN]));
+ blobmsg_get_string(tb[HDR_ORIGIN]));
if (tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS])
ustream_printf(cl->us, "Access-Control-Allow-Headers: %s\r\n",
- blobmsg_data(tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS]));
+ blobmsg_get_string(tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS]));
ustream_printf(cl->us, "Access-Control-Allow-Methods: POST, OPTIONS\r\n");
ustream_printf(cl->us, "Access-Control-Allow-Credentials: true\r\n");
ustream_printf(cl->us, "%X\r\n", len);
ustream_write(cl->us, data, len, true);
if (chunked)
- ustream_printf(cl->us, "\r\n", len);
+ ustream_printf(cl->us, "\r\n");
}
void uh_chunk_vprintf(struct client *cl, const char *format, va_list arg)
ustream_write(cl->us, buf, len, true);
else
ustream_vprintf(cl->us, format, arg);
- ustream_printf(cl->us, "\r\n", len);
+ ustream_printf(cl->us, "\r\n");
}
void uh_chunk_printf(struct client *cl, const char *format, ...)