-
Notifications
You must be signed in to change notification settings - Fork 183
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
HTTP.jl discards start of request #140
Comments
Looks like there's something wrong with FIFOBuffer (or how it's used). When the body is split over two trips through the parser, the second overwrites the first.
|
Hi @Keno, I found a few similar parser bugs related to fragmentation: #125, #126 and wrote some test cases for fragmented parsing: #124. Since then I've been in a loop of: fix-simple-bugs/more-severe-tests/fix-by-refactoring/more-severe-tests... Please feel free to give my branch a try, I'd be happy to help debugging any problems you encounter. Some examples of the tests:
|
Yeah, I was going to comment that @samoconnor has been doing a ton of stress testing on his new branch/PR. What's the overall status of that branch @samoconnor? Would it be more worth my time to dive in reviewing that and helping it get merged? Or do you feel like there's still quite a bit of work to do on it? |
Hi @quinnj, I've now got working examples of server side stuff. I tweaked HTTP.Stream, HTTP.Transaction and HTTP.Connection a little to be more symmetrical to get this working nicely. I'm no longer using the parser to parse the body unless chunked mode is used (it's more efficient to just read/write the TCP stream when not in chunked mode). The server code is simpler now that HTTP.Stream, HTTP.Transaction and HTTP.Connection do all the work. https://github.com/samoconnor/HTTP.jl/blob/simplify_parser_branch/src/server.jl#L387 In short, yes, I think it would be great if you could spend some time diving into the code and/or testing it. I don't think I'll make more structural changes. My next step is to start using AWSCore stuff on top of my branch in a real-world project. So, I hope it's all bug fixing from here. The only outstanding tasks that come to mind are:
See example of server side stuff here: JuliaWeb/WebSockets.jl#84 (comment) |
I would love to help out with testing. I am using HttpServer pretty heavily at the moment, but I need WebSockets 😅 When JuliaWeb/WebSockets.jl#84 (comment) is settled, then I'll be excited to try it out 😊 |
FWIW, I haven't seen this one after the merge, so I'll consider this fixed. |
Hi @Keno sounds good. |
I thought I had filed this somewhere before, but we're seeing a pretty bad issue using HTTP.jl to interact with the GitHub API.
Two things to note: The second Content-Length doesn't match the first and the shown body is obviously not the start of the body (which should start with
{
for valid JSON)The text was updated successfully, but these errors were encountered: