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

log redirects (http, html or js redirects) #643

Open
githule opened this issue Feb 13, 2024 · 4 comments
Open

log redirects (http, html or js redirects) #643

githule opened this issue Feb 13, 2024 · 4 comments
Labels
enhancement need-info Need additional information

Comments

@githule
Copy link

githule commented Feb 13, 2024

OS Used - ALL Information (architecture, linux flavor, etc.)

Docker over debian image amd64

Pastebin link to error you are encountering

Expected behavior (vs. what you encountered)

Not an error, just an improvement

Any additional information

Hello,

It would be great to add information in the log or report of redirects followed during the web session.
As far as I know I cant access this information.
I can help in testing if needed.

Thank you,

@githule
Copy link
Author

githule commented Feb 13, 2024

Just found a way to do this, I may give you a PR in next week if sucessful

@Relkci Relkci added the need-info Need additional information label Jun 4, 2024
@Relkci
Copy link
Collaborator

Relkci commented Jun 4, 2024

Following up, what about comparing the input URL to the final browser URL?

This wouldn't define what the redirect method was, but will indicate a redirect occurred.

@githule
Copy link
Author

githule commented Jun 4, 2024

Firefox has some command line args / settings that enable logging urls.
Not an easy solution but I did it that way.
I have no access to my code currently.
I didnt worked on report integration of theses but I will give you the command line / regex I used as soon as I can.

@Relkci Relkci changed the title Not only follow but also log redirects (http, html or js redirects) log redirects (http, html or js redirects) Jun 18, 2024
@githule
Copy link
Author

githule commented Oct 9, 2024

Hello,
For information I finally used following debug feature to generate a log file and just grepped through it.
firefox -MOZ_LOG=nsHttp:5 -MOZ_LOG_FILE=nsHttp.log
firefox -MOZ_LOG=all:1 -MOZ_LOG_FILE=all.log

The way I run it on my side is a little far from your original code and tied to my implementation so I wont propose a PR but can share some code parts/run some tests however.

Debug feature is documented here if you need.
https://firefox-source-docs.mozilla.org/networking/http/logging.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement need-info Need additional information
Projects
None yet
Development

No branches or pull requests

2 participants