-
Notifications
You must be signed in to change notification settings - Fork 0
Port PRs to solve data corruption in HTTP/2 #1
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
base: 7_85_0
Are you sure you want to change the base?
Conversation
curl#10529 curl#10530 Not completed. I couldn't port this part: ``` if((size_t)written < buflen) { Curl_dyn_tail(&ctx->outbuf, buflen - (size_t)written); return CURLE_AGAIN; } ``` because we don't have buffer to store unsent data. But this is for sending data, PUT and POST. I think the relationship with the issue is not huge.
| #include "curl_memory.h" | ||
| #include "memdebug.h" | ||
|
|
||
| #define DEBUG_HTTP2 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't affect any activity unless specifying VERBOSE option (or --verbose in command line).
| drain_this(data, httpc); | ||
| Curl_expire(data, 0, EXPIRE_RUN_NOW); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are from second PR: curl#10530
| if(h2_process_pending_input(data, httpc, err) != 0) { | ||
| return -1; | ||
| } | ||
| H2BUGF(infof(data, "[SUPER-6847] do not process pending input data when copying pausedata to the caller")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this process prevents the next frame to come in to the same stream buffer before handling paused data.
curl#10529
do not process pending input data when copying pausedata to the caller
|
|
||
| stream->pausedata += nread; | ||
| stream->pauselen -= nread; | ||
| drain_this(data, httpc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot convince myself this is correct or not, I couldn't understand how drains work. But from the usage of other are of the file, it seems fine.
| if (written >= 0 && (size_t) written < length) { | ||
| H2BUGF(infof(data, "[SUPER-6847] we don't have implementation to handle this case")); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the PR, when written is smaller than actual buffer, then it returns CURL_AGAIN. We don't have buffer to keep them until next request, I couldn't port that. But this code is for sending data, used by PUT, POST, etc. This might not relate to the issue directly.
curl#10529
curl#10530
Not completed. I couldn't port this part:
because we don't have buffer to store unsent data. But this is for sending data, PUT and POST. I think the relationship with the issue is not huge.