surawut-jirasaktavee opened a new pull request, #74452: URL: https://github.com/apache/airflow/pull/74452
`HttpHook` and `HttpAsyncHook` join the connection's base URL and the endpoint with `_url_from_endpoint()`. It added a slash when neither side had one, but did not remove one when both did, so a host of `https://api.example.com/v1/` and an endpoint of `/users` produced `https://api.example.com/v1//users`. Flask, FastAPI and Django do not normalize `//` in a path and answer 404. When both sides have a slash, the endpoint's leading slash is now dropped. Only the endpoint side is trimmed: a connection without a host yields a base URL of `https://`, and trimming that side would produce `https:/...`. With this change `https://` + `/example.org/v1` gives `https://example.org/v1`, the same as `https://` + `example.org/v1` already did. All other combinations are unchanged. Tests: the two new `test_url_from_endpoint` cases fail without the fix and pass with it; `providers/http/tests` passes (163 passed, 1 skipped). closes: #71658 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
