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
It seems if an URL with a port is used – for example, "http://localhost:9222/json/version" – then the "Host" header is not set correctly (the port seems to be missing).
I connected to the HTTP front end of a DevTools protocol server, which returns a WebSocket URL.
When I connected via ureq this WebSocket URL did not include the port of the server (and connecting to the WebSocket URL failed, therefore).
When I inspected the response of the server with different clients (Chrome and Curl), the server returned the correct WebSocket URL.
After I added the correct "Host" header to the ureq request myself, the server returned the correct WebSocket URL as well.
Therefore I assume that ureq does not set the "Host" header correctly.
According to MDN, if no port is included in the "Host" header, it defaults to 80 (for HTTP) or 443 (for HTTPS), which in the above case is incorrect.
The text was updated successfully, but these errors were encountered:
It seems if an URL with a port is used – for example, "http://localhost:9222/json/version" – then the "Host" header is not set correctly (the port seems to be missing).
I connected to the HTTP front end of a DevTools protocol server, which returns a WebSocket URL.
When I connected via
ureq
this WebSocket URL did not include the port of the server (and connecting to the WebSocket URL failed, therefore).When I inspected the response of the server with different clients (Chrome and Curl), the server returned the correct WebSocket URL.
After I added the correct "Host" header to the
ureq
request myself, the server returned the correct WebSocket URL as well.Therefore I assume that
ureq
does not set the "Host" header correctly.According to MDN, if no port is included in the "Host" header, it defaults to 80 (for HTTP) or 443 (for HTTPS), which in the above case is incorrect.
The text was updated successfully, but these errors were encountered: