feat: adds a simple Http library to Std#10478
feat: adds a simple Http library to Std#10478algebraic-dev wants to merge 352 commits intosofia/async-futurefrom
Http library to Std#10478Conversation
|
Mathlib CI status (docs):
|
|
Reference manual CI status:
|
29ae7af to
be3f20d
Compare
8b58da0 to
3009358
Compare
dde6cfa to
380dae6
Compare
206ffa3 to
ac37427
Compare
TwoFX
left a comment
There was a problem hiding this comment.
Some preliminary review for the "easy" part of the PR.
8c47efc to
45e2368
Compare
ac37427 to
577dfde
Compare
|
I don't have a full test case for this, but when I create a response like then I think the |
|
It seems to me that there are some problems with timeouts around I have this super simple server: import Std.Internal.Http
def main : IO Unit := do
(Std.Http.Server.serve (Std.Net.SocketAddress.v6 ⟨.ofParts 0 0 0 0 0 0 0 0, 8007⟩) (fun _ => pure <| .ok "hi")).blockThen I have this script: #!/bin/bash
while true; do
printf "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n"
sleep 2
doneWhen I run the server and do This also reproduces in a browser. If I open This seems to highlight several problems:
|
|
It's probably a problem with the Timer API, the interaction with Selectable and the reference counting. I'm not sure how to fix this right now but I have a solution that changes a lot of stuff in the timer api :S |
60aeda4 to
4ac2b87
Compare
93182a1 to
2bf41e9
Compare
…into sofia/async-http
localhost:8080 now is parsed as a scheme and a path, to work with the URI RFC and HTTP1.1 RFC
|
Closed because its several PRs right now feat: add core HTTP data types #12126 |
This PR adds a simple
Httplibrary toStd.