Skip to content

Commit 531a484

Browse files
committed
Fix a few comments
Switch generic http_client error level from warn to err
1 parent afdb5d7 commit 531a484

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/http/client.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,13 @@ fn AsyncHandler(comptime H: type, comptime L: type) type {
620620

621621
// at this point, If `would_be_first == true`, then
622622
// `would_be_first` should be thought of as `is_first` because
623-
623+
// we now have a complete header for the first time.
624624
if (reader.redirect()) |redirect| {
625625
// We don't redirect until we've drained the body (because,
626626
// if we ever add keepalive, we'll re-use the connection).
627627
// Calling `reader.redirect()` over and over again might not
628628
// be the most efficient (it's a very simple function though),
629-
// but for a redirect resposne, chances are we slurped up
629+
// but for a redirect response, chances are we slurped up
630630
// the header and body in a single go.
631631
if (result.done == false) {
632632
return .need_more;
@@ -660,7 +660,7 @@ fn AsyncHandler(comptime H: type, comptime L: type) type {
660660
}
661661

662662
fn handleError(self: *Self, comptime msg: []const u8, err: anyerror) void {
663-
log.warn(msg ++ ": {any} ({any} {any})", .{ err, self.request.method, self.request.uri });
663+
log.err(msg ++ ": {any} ({any} {any})", .{ err, self.request.method, self.request.uri });
664664
self.handler.onHttpResponse(err) catch {};
665665
self.deinit();
666666
}
@@ -807,7 +807,7 @@ fn AsyncHandler(comptime H: type, comptime L: type) type {
807807
secure.state = .body;
808808
const handler = self.handler;
809809
const body = handler.request.body orelse {
810-
// We've sent the haeder, and there's no body
810+
// We've sent the header, and there's no body
811811
// start receiving the response
812812
handler.receive();
813813
return;

0 commit comments

Comments
 (0)