aboutsummaryrefslogtreecommitdiff
path: root/src/http.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-10 23:41:18 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-10 23:41:18 -0700
commit0db7af6166dba28126ab71814fc84c75bbd9acef (patch)
tree2c387e4bfb7ef9794164fb8341b5f507b2d03a58 /src/http.zig
parent5e3d1dd4b5618a64dac60a1c3345fba084be34b2 (diff)
downloadbun-0db7af6166dba28126ab71814fc84c75bbd9acef.tar.gz
bun-0db7af6166dba28126ab71814fc84c75bbd9acef.tar.zst
bun-0db7af6166dba28126ab71814fc84c75bbd9acef.zip
[fetch] Add support for gzip & deflate to the http client
Powered by Cloudflare's zlib fork
Diffstat (limited to 'src/http.zig')
-rw-r--r--src/http.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http.zig b/src/http.zig
index 33c544436..5cc7376cb 100644
--- a/src/http.zig
+++ b/src/http.zig
@@ -36,7 +36,7 @@ const IPv6 = std.x.os.IPv6;
const Socket = std.x.os.Socket;
const os = std.os;
-const picohttp = @import("picohttp");
+const picohttp = @import("./deps/picohttp.zig");
const Header = picohttp.Header;
const Request = picohttp.Request;
const Response = picohttp.Response;
@@ -592,8 +592,8 @@ pub const RequestContext = struct {
}
pub fn appendHeader(ctx: *RequestContext, comptime key: string, value: string) void {
- if (isDebug or isTest) std.debug.assert(!ctx.has_written_last_header);
- if (isDebug or isTest) std.debug.assert(ctx.res_headers_count < res_headers_buf.len);
+ if (comptime isDebug or isTest) std.debug.assert(!ctx.has_written_last_header);
+ if (comptime isDebug or isTest) std.debug.assert(ctx.res_headers_count < res_headers_buf.len);
res_headers_buf[ctx.res_headers_count] = Header{ .name = key, .value = value };
ctx.res_headers_count += 1;
}