-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
std.http: add connection pooling, handle keep-alive and compressed content #14762
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
Conversation
6758c3b to
0b3307c
Compare
alichraghi
left a comment
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.
test-filetimestamp.tmp what's this? lol
|
Really good question, not sure how I missed that or what that came from. |
I've seen that file sometimes get leftover by running the tests. |
c227f90 to
fbe5f7d
Compare
fbe5f7d to
31bd2b0
Compare
|
It looks good; I'd like to merge it. How have you been testing it? Do you have any inclination to help out with adding a testing system for this stuff? |
|
I've currently been testing the new features against http://httpbin.org (in http, to bypass all of the tls bugs in std.crypto). I can't really fuzz it against anything but it has worked for all of the things I've tested it against. I don't see a way to seriously test std.http.Client without first implementing a std.http.Server to test against. |
bbc6865 to
524e0cd
Compare
The connection pool is implemented as a TailQueue linked list, as there shouldn't be too many connections to loop over.
This should also fix a few problems that people were having where the server would try to read more data than the server was sending, leaving them in a deadlock.
Redirected requests now always read the content associated with the redirect, but the data is voided. This is required to prepare the connection for another request (but could potentially be avoided on a Connection:close)