~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH hare-http] fixes for latest hare stdlib

Details
Message ID
<20231021201026.426485-1-rebelgeek@blainsmith.com>
DKIM signature
missing
Download raw message
Patch: +6 -4
Signed-off-by: Blain Smith <rebelgeek@blainsmith.com>
---
 net/http/client.ha    | 2 ++
 net/http/do.ha        | 4 ++--
 net/http/transport.ha | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/net/http/client.ha b/net/http/client.ha
index fed803e..1e2edbd 100644
--- a/net/http/client.ha
+++ b/net/http/client.ha
@@ -57,6 +57,8 @@ fn new_request(client: *client, method: str, target: *uri::uri) request = {
			req.target.port = 80;
		case "https" =>
			req.target.port = 443;
		case =>
			req.target.port = 80;
		};
	};

diff --git a/net/http/do.ha b/net/http/do.ha
index 1d68da7..4631c71 100644
--- a/net/http/do.ha
+++ b/net/http/do.ha
@@ -18,8 +18,8 @@ export fn do(client: *client, req: *request) (response | error) = {
	assert(req.target.scheme == "http"); // TODO: https
	const conn = dial::dial_uri("tcp", req.target)?;

	let buf: [os::BUFSIZ]u8 = [0...];
	let file = bufio::buffered(conn, [], buf);
	let buf: [os::BUFSZ]u8 = [0...];
	let file = bufio::init(conn, [], buf);
	bufio::setflush(&file, []);

	fmt::fprintf(&file, "{} ", req.method)?;
diff --git a/net/http/transport.ha b/net/http/transport.ha
index 979fc7a..7c59307 100644
--- a/net/http/transport.ha
+++ b/net/http/transport.ha
@@ -116,7 +116,7 @@ fn new_reader(
type identity_reader = struct {
	vtable: io::stream,
	conn: io::handle,
	buffer: [os::BUFSIZ]u8,
	buffer: [os::BUFSZ]u8,
	pending: size,
	length: size,
};
@@ -189,7 +189,7 @@ type chunk_state = enum {
type chunked_reader = struct {
	vtable: io::stream,
	conn: io::handle,
	buffer: [os::BUFSIZ]u8,
	buffer: [os::BUFSZ]u8,
	state: chunk_state,
	// Amount of read-ahead data in buffer
	pending: size,
-- 
2.34.1
Details
Message ID
<CWLNSKNPY37B.3Q5ADQBLO804Y@taiga>
In-Reply-To
<20231021201026.426485-1-rebelgeek@blainsmith.com> (view parent)
DKIM signature
missing
Download raw message
Does not apply
Details
Message ID
<CAO3qA0mVA7d1=Tw8QVpMKv5YaStu1K=7YuvnZQWm3khdyrmQZQ@mail.gmail.com>
In-Reply-To
<CWLNSKNPY37B.3Q5ADQBLO804Y@taiga> (view parent)
DKIM signature
missing
Download raw message
Apologies, I will get that taken care of.
Reply to thread Export thread (mbox)