-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
Nginx::Request#authority doesn't return userinfo.
% curl http://yyamano:pass@localhost:58080/authority
localhost:58080
% curl http://localhost:58080/authority
localhost:58080
location /authority {
mruby_content_handler_code 'Nginx.rputs Nginx::Request.new.authority.to_s';
}
It just returns HOST header field that contains only host and port.
static mrb_value ngx_mrb_get_request_var_authority(mrb_state *mrb, mrb_value self)
{
mrb_value v = ngx_mrb_get_request_var(mrb, self);
return mrb_funcall(mrb, v, "http_host", 0, NULL);
}
https://tools.ietf.org/html/rfc7230#section-5.4
The "Host" header field in a request provides the host and port
information from the target URI, enabling the origin server to
distinguish among resources while servicing requests for multiple
host names on a single IP address.
Host = uri-host [ ":" port ] ; Section 2.7.1
Metadata
Metadata
Assignees
Labels
No labels