__header(connection, connection) \
__header(cookie, cookie) \
__header(host, host) \
+ __header(origin, origin) \
__header(referer, referer) \
__header(user_agent, user-agent) \
__header(content_type, content-type) \
- __header(content_length, content-length)
+ __header(content_length, content-length) \
+ __header(x_http_method_override, x-http-method-override) \
+ __header(http_auth_user, http-auth-user) \
+ __header(http_auth_pass, http-auth-pass)
#undef __header
#define __header __enum_header
{ "HTTP_CONNECTION", HDR_connection },
{ "HTTP_COOKIE", HDR_cookie },
{ "HTTP_HOST", HDR_host },
+ { "HTTP_ORIGIN", HDR_origin },
{ "HTTP_REFERER", HDR_referer },
{ "HTTP_USER_AGENT", HDR_user_agent },
+ { "HTTP_X_HTTP_METHOD_OVERRIDE", HDR_x_http_method_override },
+ { "HTTP_AUTH_USER", HDR_http_auth_user },
+ { "HTTP_AUTH_PASS", HDR_http_auth_pass },
{ "CONTENT_TYPE", HDR_content_type },
{ "CONTENT_LENGTH", HDR_content_length },
};
cur = tb[proc_header_env[i].idx];
vars[i].name = proc_header_env[i].name;
- vars[i].value = cur ? blobmsg_data(cur) : "";
+ vars[i].value = cur ? blobmsg_data(cur) : NULL;
}
memcpy(&vars[i], extra_vars, sizeof(extra_vars));
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");