| author | |
| committer | |
| log | 6b411f147c49ce0a0004f314b9c40e78ed804c5b |
| tree | a8fdedcb447672b24be4120be41220a0398157f0 |
| parent | 618a435ad4ea259d2e2546ad4b85e2e01f087493 |
thank you everybody3 files changed, 6 insertions(+), 9 deletions(-)
lib/std/Uri.zig+2-1| ... | ... | @@ -377,7 +377,8 @@ pub fn parse(text: []const u8) ParseError!Uri { |
| 377 | 377 | |
| 378 | 378 | pub const ResolveInPlaceError = ParseError || error{NoSpaceLeft}; |
| 379 | 379 | |
| 380 | /// Resolves a URI against a base URI, conforming to RFC 3986, Section 5. | |
| 380 | /// Resolves a URI against a base URI, conforming to | |
| 381 | /// [RFC 3986, Section 5](https://www.rfc-editor.org/rfc/rfc3986#section-5) | |
| 381 | 382 | /// |
| 382 | 383 | /// Assumes new location is already copied to the beginning of `aux_buf.*`. |
| 383 | 384 | /// Parses that new location as a URI, and then resolves the path in place. |
lib/std/http.zig+2-2| ... | ... | @@ -496,7 +496,7 @@ pub const Reader = struct { |
| 496 | 496 | return reader.in; |
| 497 | 497 | }, |
| 498 | 498 | .deflate => { |
| 499 | decompressor.* = .{ .flate = .init(reader.in, .raw, decompression_buffer) }; | |
| 499 | decompressor.* = .{ .flate = .init(reader.in, .zlib, decompression_buffer) }; | |
| 500 | 500 | return &decompressor.flate.reader; |
| 501 | 501 | }, |
| 502 | 502 | .gzip => { |
| ... | ... | @@ -730,7 +730,7 @@ pub const Decompressor = union(enum) { |
| 730 | 730 | return transfer_reader; |
| 731 | 731 | }, |
| 732 | 732 | .deflate => { |
| 733 | decompressor.* = .{ .flate = .init(transfer_reader, .raw, buffer) }; | |
| 733 | decompressor.* = .{ .flate = .init(transfer_reader, .zlib, buffer) }; | |
| 734 | 734 | return &decompressor.flate.reader; |
| 735 | 735 | }, |
| 736 | 736 | .gzip => { |
lib/std/http/Client.zig+2-6| ... | ... | @@ -115,8 +115,6 @@ pub const ConnectionPool = struct { |
| 115 | 115 | /// Tries to release a connection back to the connection pool. |
| 116 | 116 | /// If the connection is marked as closing, it will be closed instead. |
| 117 | 117 | /// |
| 118 | /// `allocator` must be the same one used to create `connection`. | |
| 119 | /// | |
| 120 | 118 | /// Threadsafe. |
| 121 | 119 | pub fn release(pool: *ConnectionPool, connection: *Connection) void { |
| 122 | 120 | pool.mutex.lock(); |
| ... | ... | @@ -484,10 +482,8 @@ pub const Response = struct { |
| 484 | 482 | }; |
| 485 | 483 | var it = mem.splitSequence(u8, bytes, "\r\n"); |
| 486 | 484 | |
| 487 | const first_line = it.next().?; | |
| 488 | if (first_line.len < 12) { | |
| 489 | return error.HttpHeadersInvalid; | |
| 490 | } | |
| 485 | const first_line = it.first(); | |
| 486 | if (first_line.len < 12) return error.HttpHeadersInvalid; | |
| 491 | 487 | |
| 492 | 488 | const version: http.Version = switch (int64(first_line[0..8])) { |
| 493 | 489 | int64("HTTP/1.0") => .@"HTTP/1.0", |