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 http limitation for large "content-length" #56331

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

Cnidarias
Copy link
Contributor

@Cnidarias Cnidarias commented Dec 30, 2021

When a request was issued to a server that returned "content-length" header
whose value was greater than that of an "int" we ran into overflow
problems. The fix for this was rather simple by increasing the data
type to int64_t

Fixes #56314

When a request was issued to a server that returned "content-length" header
whose value was greater than that of an "int" we ran into overflow
problems. The fix for this was rather simple by increasing the data
type to `int64_t`
@Cnidarias Cnidarias requested a review from a team as a code owner December 30, 2021 00:20
@Calinou Calinou added bug topic:network cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Dec 30, 2021
@Calinou Calinou added this to the 4.0 milestone Dec 30, 2021
@timothyqiu
Copy link
Member

Note when cherry-picking: String::to_int() is still 32-bit on 3.x, so body_size assignment should also be changed to use to_int64().

body_size = s.substr(s.find(":") + 1, s.length()).strip_edges().to_int();

@mhilbrunner mhilbrunner requested review from a team and removed request for a team January 4, 2022 11:53
@Faless Faless merged commit 23ba76f into godotengine:master Jan 4, 2022
@Faless
Copy link
Collaborator

Faless commented Jan 4, 2022

Thanks!

@Faless
Copy link
Collaborator

Faless commented Jan 4, 2022

For maintainers, see notes above for cherry picking, it does require some manual changes.

@Cnidarias Cnidarias deleted the large_http_downloads branch January 4, 2022 15:35
@akien-mga
Copy link
Member

Cherry-picked for 3.5. (Thanks @timothyqiu for the hint!)

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 5, 2022
@akien-mga
Copy link
Member

Cherry-picked for 3.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTPRequest fails to download files > 2.1GB
6 participants