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

Make sure to timeouts do not look like normal EOF. #50

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Make sure to timeouts do not look like normal EOF. #50

merged 1 commit into from
Jan 29, 2020

Conversation

adamreichold
Copy link
Contributor

Closes #49

@sbstp
Copy link
Owner

sbstp commented Jan 27, 2020

Isn't this what we decided to abandon in your last merge request?

@adamreichold
Copy link
Contributor Author

Isn't this what we decided to abandon in your last merge request?

Indeed. But now we got a bug report about this being unexpected behavior. So I bit my teeth and tried to implement something reasonable.

The alternative seems to be to tell the user to check his/her content length which does not sound very convincing. (Or to implement those checks ourselves everywhere but even this would leave a discrepancy between the io::Read-based interface and high-level ones like .text().)

@sbstp
Copy link
Owner

sbstp commented Jan 29, 2020

I care more about giving a under friendly library than a fast library, so I'm going to merge this. I don't think this will affect performance much anyway, we're doing IO after all.

@sbstp
Copy link
Owner

sbstp commented Jan 29, 2020

I'll release a patch with this fix.

@sbstp sbstp merged commit a2ebd9b into sbstp:master Jan 29, 2020
@adamreichold adamreichold deleted the bring-back-timeout-check branch January 29, 2020 09:52
@adamreichold
Copy link
Contributor Author

I care more about giving a under friendly library than a fast library, so I'm going to merge this. I don't think this will affect performance much anyway, we're doing IO after all.

I agree. Also I would like to add that my personal reservations against this code where never about performance, it is complexity I am concerned about, i.e. mostly readability and learnability of the code base.

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.

Timeout silently truncates response body
2 participants