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

ReadAll function failed to read #9

Open
AlessandroZ opened this issue Oct 2, 2019 · 1 comment
Open

ReadAll function failed to read #9

AlessandroZ opened this issue Oct 2, 2019 · 1 comment

Comments

@AlessandroZ
Copy link

Hi @tomnomnom,

This issue could be related to #5.

I had some timeout problems using your tool so I tried to investigate a bit to fix it. Fixing the timeout to 5s didn't resolve my problem (with req.Timeout = time.Second * 5). However, I have seen that the timeout wasn't the problem but the hang came from the ReadAll function. When its passed here and it arrives here.

Even reading byte by byte the problem occured:

} else {

	for {
		v, err := r.ReadByte()
		if v == 0 || err != nil {
			break
		}
        resp.body = append(resp.body, v)
    }
}

I try to manage to check the size before reading the buffer but without success. Right now, I have removed the else condition to be sure it does not hang out.

Thanks again for all your tools, your doing an amazing work.

@AlessandroZ
Copy link
Author

Same thing when the server does not respond any answer, it hangs out here. Seems difficult to detect if r is legit or not. :(

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

No branches or pull requests

1 participant