deno
2d9e0b9e - fix(ext/http,ext/node): native node:http req.url is the raw request-target

Commit
144 days ago
fix(ext/http,ext/node): native node:http req.url is the raw request-target req.url was nativeRequestTarget(op_http_get_request_url(...)), which strips the origin off the engine's synthesized full URL -- collapsing an absolute-form proxy request-target (GET http://host/path, sent by a client through an HTTP proxy) back to origin-form (/path). Node's req.url is the verbatim request-target. Add op_http_get_request_raw_target returning the engine's raw inner.path (origin-form /path, absolute-form http://host/path, authority-form host:port for CONNECT, * for OPTIONS) and use it directly; drop the now-dead nativeRequestTarget helper. Fixes node:http specs::node::http_proxy_env_no_allow_env.
Author
Committer
Parents
Loading