How do I get the correct redirected URL by curl/wget?
Target URL:
- https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm-3.18.git;a=commit;h=430f3805c82634a3cb969d83acc4fc4c0ee6af27
- You need to escape
;
(semi-colon) to%3B
when passing curl/wget
A browser, like Chrome/FireFox, resolves the above target URL to the following URL which includes commit
and this is expected result.
However, both curl and wget resolve the target URL to the following URL which includes tree
and this is NOT expected behavior.
The deference of redirected URL is including commit
or tree
, and it might be a gitweb issue instead of curl/wget.
How do I get the correct redirected URL by curl/wget?
To change a User-Agent is helpless. Any ideas?
My curl command is as follows:
$ curl -v -L -o output.html \
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm-3.18.git%3Ba=commit%3Bh=430f3805c82634a3cb969d83acc4fc4c0ee6af27