Remove debug logging
This commit is contained in:
parent
cbf98c1cf3
commit
cfdc8c5761
1 changed files with 0 additions and 4 deletions
|
@ -148,7 +148,6 @@ fn prepareBody(headers: Fields, reader: anytype) !?TransferStream(@TypeOf(reader
|
||||||
},
|
},
|
||||||
.chunked => {
|
.chunked => {
|
||||||
if (headers.get("Content-Length") != null) return error.BadRequest;
|
if (headers.get("Content-Length") != null) return error.BadRequest;
|
||||||
std.log.debug("Using chunked T-E", .{});
|
|
||||||
return TransferStream(@TypeOf(reader)){
|
return TransferStream(@TypeOf(reader)){
|
||||||
.underlying = .{
|
.underlying = .{
|
||||||
.chunked = try ChunkedStream(@TypeOf(reader)).init(reader),
|
.chunked = try ChunkedStream(@TypeOf(reader)).init(reader),
|
||||||
|
@ -199,13 +198,10 @@ fn ChunkedStream(comptime R: type) type {
|
||||||
const line = self.underlying.readUntilDelimiter(&buf, '\n') catch |err| {
|
const line = self.underlying.readUntilDelimiter(&buf, '\n') catch |err| {
|
||||||
return if (err == error.StreamTooLong) error.InvalidChunkHeader else err;
|
return if (err == error.StreamTooLong) error.InvalidChunkHeader else err;
|
||||||
};
|
};
|
||||||
std.log.debug("{}: {s}", .{ line.len, line });
|
|
||||||
if (line.len < 2 or line[line.len - 1] != '\r') return error.InvalidChunkHeader;
|
if (line.len < 2 or line[line.len - 1] != '\r') return error.InvalidChunkHeader;
|
||||||
|
|
||||||
const size = std.fmt.parseInt(usize, line[0 .. line.len - 1], 16) catch return error.InvalidChunkHeader;
|
const size = std.fmt.parseInt(usize, line[0 .. line.len - 1], 16) catch return error.InvalidChunkHeader;
|
||||||
|
|
||||||
std.log.debug("Got chunk header of size {}: {s}", .{ size, line });
|
|
||||||
|
|
||||||
return if (size != 0) size else null;
|
return if (size != 0) size else null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue