v0.19: http client #1451
No reviewers
Labels
No labels
UX
active development
backlog
blocker
bootstrap
bounty
bug
dependencies
discussion
documentation
duplicate
enhancement
flaky test
help wanted
invalid
javascript
question
release
tendentious
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mighty-gerbils/gerbil!1451
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "v0.19-http"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v0.19: http thingsto v0.19: http client@ -0,0 +90,4 @@(with-zlib-error (inflateInit zstream) Z_OK)(__open-inflate zstream reader buffer-size)))(def (compress (data : :u8vector)After reading the docs, it looks like compress and compress-gz are the same algorithm (RFC 1951= LZ77 + Huffman), but but compress-gz outputs things in .gz format, whereas compress outputs things in zlib format, which differ slightly in what headers and checksums they use. That ought to be documented somewhere.
ok, i'll put a comment.
@ -0,0 +27,4 @@(defrequest-method http-get "GET")(defrequest-method http-head "HEAD")(defrequest-method http-post "POST")(defrequest-method http-put "put")Why are these lowercase?
brain fart, fixed.
@ -0,0 +40,4 @@(def (http-request (url : URL)method: (method : :string)headers: (uheaders : :list) ; AList [string . string]; user supplied headersWhy rename uheaders?
Maybe user-headers or user-supplied-headers
Always prefer longer names.
user headers, to avoid name shadowing. I guess i could call it user-headers.
@ -0,0 +17,4 @@(def (http-digest-auth-header . args)=> :pair(TODO http-digest-auth-header))A job for the LLM?
yeah, too much tedious work. have you seen the spec?
@ -0,0 +1,181 @@;;; -*- Gerbil -*-;;; © vyzo;;; HTTP chunked reader and writerVERY NICE!
@ -0,0 +7,4 @@:std/iter:std/net/url)(def max-line-length 16384)Are these arbitrary, or from a standard? A comment to that effect, please. Also, is that line length for headers specifically? Deserves mention, too.
Grok tells me Apache has a 8190 line limit in practice, Nginx something similar. And that various servers seem to have 4KB to 32KB total size limit for headers, in practice.
You seem to allow a 16MB limit for headers... that seems like a lot in comparison.
arbitrary, and that;s a lot indeed. I'll see if it is easy to make it aggregate, otherwise i'll lower to 64x2048
64x8192
@ -0,0 +1,39 @@;;; -*- Gerbil -*-;;; © vyzoOK, but why all the renames? I'm in favor of data structures making sense, and then exposing them---when possible.
i want to make it easy to port existing code, including our tests that use this module a lot. We could remove it before release.
marked deprecated.