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

fix truncation of long response file names #465

Merged
merged 2 commits into from
Dec 24, 2021
Merged

fix truncation of long response file names #465

merged 2 commits into from
Dec 24, 2021

Conversation

ola456
Copy link
Contributor

@ola456 ola456 commented Dec 22, 2021

Fix for a "file name too long" error that I got with "httpx -sr".

$ echo "https://example.com/8444441444444444444444444444444444444444444444444444444444444444444444444444455553333333333333333333333333333333333333333333333aaaaaaa2exasdasdasdasdasdasdadasdasdasdasd2221111111lllllllllllllllllllllllla111222222222mplabcdefghijkl123456789" | httpx -sr -srd test -debug
...
[WRN] Could not write response at path 'test/example.com_8444441444444444444444444444444444444444444444444444444444444444444444444444455553333333333333333333333333333333333333333333333aaaaaaa2exasdasdasdasdasdasdadasdasdasdasd2221111111lllllllllllllllllllllllla111222222222mplabcdefghijkl123456789.txt', to disk: open test/example.com_8444441444444444444444444444444444444444444444444444444444444444444444444444455553333333333333333333333333333333333333333333333aaaaaaa2exasdasdasdasdasdasdadasdasdasdasd2221111111lllllllllllllllllllllllla111222222222mplabcdefghijkl123456789.txt: file name too long

@ehsandeep ehsandeep requested a review from Mzack9999 December 22, 2021 12:54
Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ola456 Very nice work! I moved the offset calculation directly into a constant since it's static. Thanks!

@ola456
Copy link
Contributor Author

ola456 commented Dec 23, 2021

Even better, thank you!

@ehsandeep ehsandeep merged commit 4afd36a into projectdiscovery:dev Dec 24, 2021
@ola456 ola456 deleted the patch-1 branch December 27, 2021 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants