You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: when http.request's opinions include proxy settings and options.path is a full URL (e.g., http://httpbin.org/200), the website proxy server access should be http://httpbin.org/200, but in Deno it is http://httpbin.org/http://httpbin.org/200.
For convenience, I use Axios as demo, and related code is here. When I add a patch options.path = new URL(options.path).pathname;, it becomes correct.
This demo requires a http proxy running at port 8892 (such as Fiddler or mitmproxy).
In Node.JS, it can get http://httpbin.org/get correctly. In Deno, it gets a 404, while Fiddler shows it is requesting http://httpbin.org/http://httpbin.org/get
The text was updated successfully, but these errors were encountered:
Young-Lord
changed the title
inconsistent HTTP proxy in Node API http
Wrong path when using HTTP proxy in Node API httpJan 16, 2025
Version: Deno 2.1.5
TLDR: when
http.request
's opinions include proxy settings andoptions.path
is a full URL (e.g.,http://httpbin.org/200
), the website proxy server access should behttp://httpbin.org/200
, but in Deno it ishttp://httpbin.org/http://httpbin.org/200
.POC:
For convenience, I use Axios as demo, and related code is here. When I add a patch
options.path = new URL(options.path).pathname;
, it becomes correct.This demo requires a http proxy running at port 8892 (such as Fiddler or mitmproxy).
In Node.JS, it can get
http://httpbin.org/get
correctly. In Deno, it gets a 404, while Fiddler shows it is requestinghttp://httpbin.org/http://httpbin.org/get
The text was updated successfully, but these errors were encountered: