Andrew Kelley
74c56376ee
std: update http.WebSocket to new API
2025-07-01 16:35:29 -07:00
Andrew Kelley
af4bb996f0
std.http.Client: fix redirects
2025-07-01 16:35:29 -07:00
Andrew Kelley
b3df9d4bf9
std.http.Client: sendBody flush by default; fix flushing
...
flushing must also flush TLS client if it exists
2025-07-01 16:35:28 -07:00
Andrew Kelley
d0b8392852
std.http fixes
2025-07-01 16:35:28 -07:00
Andrew Kelley
b78e375a2d
std.http.Server: flush by default with respond
2025-07-01 16:35:28 -07:00
Andrew Kelley
2abbcb6d2a
std.http: fix chunked transfer flushing and end-of-stream handling
2025-07-01 16:35:28 -07:00
Andrew Kelley
d9aa84de28
std.http.Client: fix alignment when freeing memory
2025-07-01 16:35:28 -07:00
Andrew Kelley
e4126aa213
std.http.Server: remove the 25 header limit
...
no longer makes sense when there is an output buffer
2025-07-01 16:35:28 -07:00
Andrew Kelley
4716c00366
std.http.Server: don't try to discard nonexistent body
2025-07-01 16:35:28 -07:00
Andrew Kelley
9ed20386bb
std.http.Reader: simplify states
2025-07-01 16:35:28 -07:00
Andrew Kelley
bb7af21d6f
std.crypto.tls.Client: update to new reader/writer API
2025-07-01 16:35:28 -07:00
Andrew Kelley
25ac70f973
std: WIP update more to new reader/writer
...
delete some bad readers/writers
add limited reader
update TLS
about to do something drastic to compress
2025-07-01 16:35:28 -07:00
Andrew Kelley
c7040171fb
std.http: mostly finish the rewrite
2025-07-01 16:35:28 -07:00
Andrew Kelley
d8cea03245
std.http: more update
2025-07-01 16:35:28 -07:00
Andrew Kelley
ab3a947bef
get build runner compiling again
2025-07-01 16:35:28 -07:00
Andrew Kelley
81b0d14e2b
std.http: rewrite
...
WIP
2025-07-01 16:35:28 -07:00
Andrew Kelley
396464ee6b
update std.net and nail down delimiter APIs
...
"exclusive" functions still need to report EndOfStream after the last
returned slice
2025-07-01 16:35:28 -07:00
Andrew Kelley
1bb75f9d62
stabilize readRemainingArrayList and readRemainingAlloc API
2025-07-01 16:35:28 -07:00
Andrew Kelley
d9b9e3c272
std: update some http to new reader/writer
2025-07-01 16:35:28 -07:00
Andrew Kelley
19b82ca7ab
std.http.Server: implement chunked request parsing
2025-07-01 16:35:27 -07:00
Jacob Young
6a0f2227e8
build_runner: port to std.io.BufferedReader API changes
2025-07-01 16:35:27 -07:00
Andrew Kelley
7b0d826849
std.http.Server: fix BufferedReader API usage
2025-07-01 16:35:27 -07:00
Andrew Kelley
9fe0ce377c
std.http.Server: update end methods
2025-07-01 16:35:27 -07:00
Andrew Kelley
f333267782
update std.http.Server to new API
...
and rename std.io.BufferedWriter.writableSlice to writableSliceGreedy
and make writableSlice and writableArray advance the buffer end position
introduce std.io.BufferedWriter.writeSplatLimit but it's unimplemented
2025-07-01 16:35:27 -07:00
Andrew Kelley
98f463ad59
revert introduction of @errorCast in this branch
2025-07-01 16:35:27 -07:00
Jacob Young
ffb0e283d7
build_runner: fix compile errors
2025-07-01 16:35:27 -07:00
Andrew Kelley
a4fdda6ae0
std.io: redo Reader and Writer yet again
...
explicit error sets ahoy matey
delete some sus APIs from File that need to be reworked
2025-07-01 16:35:27 -07:00
Andrew Kelley
20a784f713
std: start converting networking stuff to new reader/writer
2025-07-01 16:35:27 -07:00
Jacob Young
a21e7ab64f
build_runner: port to new std.io.BufferedWriter API
2025-07-01 16:35:26 -07:00
Andrew Kelley
646454beb5
maybe it's better to track bytes written in BufferedWriter
2025-07-01 16:35:26 -07:00
Andrew Kelley
57e1fc29d2
reader interface vecs and bufferedwriter arraylist
2025-07-01 16:35:26 -07:00
Andrew Kelley
4aed226e07
zig fmt compiling
2025-07-01 16:35:26 -07:00
Andrew Kelley
5ada2e3937
std.http tests passing with updated writer API
...
fix splat implementation in std.fs.File
update http.Client, with caveats:
* TODO: only 1 underlying write call
* TODO: don't rely on max_buffers_len exceeding the caller
* TODO: handle splat
update net.Stream API. also make it use WSASend on windows
2025-07-01 16:35:26 -07:00
Andrew Kelley
716b4489be
update more of the std lib to new API
2025-07-01 16:35:26 -07:00
Andrew Kelley
fced9467e8
std ArrayList unit tests passing
2025-07-01 16:35:26 -07:00
Jacob Young
1f6f8b0ffe
x86_64: implement integer @reduce(.Add)
2025-05-28 15:10:22 -04:00
Shun Sakai
5fc4448e45
chore(std.mem): Rename trimLeft and trimRight
...
Rename `trimLeft` to `trimStart`, and `trimRight` to `trimEnd`.
`trimLeft` and `trimRight` functions remain as deprecated aliases for
these new names.
2025-04-27 18:03:59 +09:00
Andrew Kelley
337e1109f5
std.DoublyLinkedList: remove length tracking
...
this is trivial to tack on, and in my experience it is rarely wanted.
2025-04-03 15:57:35 -07:00
Kuwazy
6b6dc1cd3a
Added check for HTTP version and GET method when upgrading WebSocket to comply with RFC 6455. ( #23332 )
2025-03-25 15:00:50 +01:00
Elijah M. Immer
1f92b394e9
lib/std/http/Client.zig: Ignore empty proxy environment variables ( #23223 )
...
This fixes #21032 by ignoring proxy environment variables that are
empty.
2025-03-14 21:20:42 +01:00
Andrew Kelley
eb3c7f5706
zig build fmt
2025-02-22 17:09:20 -08:00
87flowers
8469a44c9c
std/http/Client: Remove TODO comments on indentation
2025-02-22 17:09:20 -08:00
Andrew Kelley
df1fa36feb
Revert "std.http.Server: add Request.getHeader() function ( #21625 )"
...
This reverts commit 21823d1b5d1ebfa27df954c2cef5d0f231fb8402.
It's a bad API that could easily lead to O(N^2) logic.
2025-01-27 11:13:56 -08:00
dbubel
21823d1b5d
std.http.Server: add Request.getHeader() function ( #21625 )
2025-01-27 17:58:05 +00:00
Jacob Young
7c713251ca
x86_64: looped instructions
2025-01-16 20:42:08 -05:00
Jacob Young
9373abf7f7
std.http.Client: change ssl key log creation permission bits
...
This is the same mode used by openssh for private keys. This does not
change the mode of an existing file, so users who need something
different can pre-create the file with their designed permissions or
change them after the fact, and running another process that writes to
the key log will not change it back.
2024-11-07 20:56:33 -05:00
Jacob Young
de53e6e4f2
std.crypto.tls: improve debuggability of encrypted connections
...
By default, programs built in debug mode that open a https connection
will append secrets to the file specified in the SSLKEYLOGFILE
environment variable to allow protocol debugging by external programs.
2024-11-07 20:25:26 -05:00
Jacob Young
c2a779ae79
std.crypto.tls: implement TLSv1.2
2024-11-07 20:25:26 -05:00
Andrew Kelley
075ec55552
disable failing test
...
tracked by #21457
2024-09-19 18:20:22 -07:00
Linus Groh
e17dfb9da0
std.http.WebSocket: Make 'upgrade: websocket' check case-insensitive
...
I've seen implementations in the wild that send 'Upgrade: WebSocket',
which currently fails the handshake.
From https://datatracker.ietf.org/doc/html/rfc6455 :
"If the response lacks an |Upgrade| header field or the |Upgrade| header
field contains a value that is not an ASCII case-insensitive match for
the value "websocket", the client MUST _Fail the WebSocket Connection_."
2024-09-12 20:02:19 -07:00