Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Show final URL if --follow-redirects is used #215

Closed
JoshuaMart opened this issue Mar 22, 2021 · 6 comments · Fixed by #267 or #286
Closed

[Feature] Show final URL if --follow-redirects is used #215

JoshuaMart opened this issue Mar 22, 2021 · 6 comments · Fixed by #267 or #286
Assignees
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Milestone

Comments

@JoshuaMart
Copy link
Contributor

Hello,
It would be interesting I think to display the final URL when the --follow-redirects option is used.

For example if I use httpx on the domain google.com, there will be a redirection to https://www.google.com
httpx

As it is, if I use another tool behind it such as nuclei, the requests will not be made on the right URL
nuclei

Thank's

@ehsandeep
Copy link
Member

Hi @JoshuaMart,

Thanks for opening an issue for this, what you suggested here will result in many unexpected behaviors in general and for nuclei as input as well, as with -follow-redirects the final URL could lead to hxxp://www.test.com/test/some_url which is not expected input for the nuclei and also unrelated URLs which is also not expected when you probing for subs for the target domain, closing this issue as no changes required here.

@ehsandeep ehsandeep changed the title Show final URL if --follow-redirects is used [Feature] Show final URL if --follow-redirects is used Mar 29, 2021
@ehsandeep
Copy link
Member

Reopening on the 2nd thought, this will be a useful addition to print the final URL as additional information when -follow-redirects is used.

@ehsandeep ehsandeep reopened this May 7, 2021
@ehsandeep
Copy link
Member

ehsandeep commented May 7, 2021

And here is how it will look like in CLI and the same can be exposed in JSON as well.

echo apps.tesla.com | httpx -silent -follow-redirects

https://apps.tesla.com [https://mobile.tesla.com/appstore/account/username?ReturnUrl=%2Fappstore%2F]

@ehsandeep ehsandeep added the Type: Enhancement Most issues will probably ask for additions or changes. label May 7, 2021
@ehsandeep ehsandeep added the Priority: Medium This issue may be useful, and needs some attention. label May 7, 2021
@Mzack9999 Mzack9999 linked a pull request May 8, 2021 that will close this issue
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label May 8, 2021
@ehsandeep
Copy link
Member

@JoshuaMart this is now added into development version #267 (comment)

@JoshuaMart
Copy link
Contributor Author

Cool, Thank's @ehsandeep :)

@ehsandeep ehsandeep added this to the v1.0.7 milestone May 25, 2021
@ehsandeep ehsandeep linked a pull request May 26, 2021 that will close this issue
@ehsandeep
Copy link
Member

@JoshuaMart this is now live in the latest release of httpx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@ehsandeep @Mzack9999 @JoshuaMart and others