forked from shaka-project/shaka-packager
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HttpFile implementing the HTTP PUT chunked flavor
- Loading branch information
Showing
4 changed files
with
274 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5f980ff
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 response to shaka-project#149 (comment)
If the bug is gone, please ignore my comments.
Lines 311 and 312 of http_file.cc may be problematic for the PUT method since the memory pointed by the string pointer is probably gone when data is written.
It might make sense to make |response| a member variable and use it as a blackhole, since neither methods use the response. It should still work without setting the WRITEFUNCTION and WRITEDATA but it seems like it's not recommended
https://curl.haxx.se/mail/lib-2008-11/0271.html
I don't think 125 has to be posted to a worker pool. I don't think it hurts at the moment, but it reduces the number of variables if the problem is due to data race.
5f980ff
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.
Dear @rkuroiwa,
thanks for taking the time commenting on the code. Do you mind if i transfer your remarks to the conversation at issue shaka-project#149? Then, we can follow up on this and might make further collaborative progress by eventually getting more eyeballs on the remaining issues.
Best,
Andreas.
5f980ff
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.
Hi @amotl
Sure.
I thought putting comments here is better since the code is here. I was thinking discussing the design there, and the comments for the code here. Also there is a link to my comments on the issue page already (github did it for me :)).
FYI I want to setup a simple Python HTTP server and use the unit test framework to figure out the problem, just haven't gotten around to it.
Thanks,
Rintaro
5f980ff
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.
Dear Rintaro (@rkuroiwa),
I prepared httpd-reflector.py for doing just that, it's part of my workbench for this job. It might also help you inspecting the HTTP requests and shows the requests for the HTTP PATCH transport flavor just fine already. See also HTTP upload » Example.
Thanks for your time,
Andreas.