add comments

This commit is contained in:
floscodes 2023-05-18 20:47:08 +02:00
parent 76f87276b5
commit 36b6440f7e

View file

@ -60,7 +60,7 @@ pub const Server = struct {
header_string = buffer.items[0..header_end]; header_string = buffer.items[0..header_end];
try buildRequestHeadersAndCookies(&req, header_string, allocator); try buildRequestHeadersAndCookies(&req, header_string, allocator);
// Checking Request method and if it is one that can send a body. // Checking Request method and if it is one that can send a body.
// If not, exit the loop. // If it is one that must not have a body, exit the loop.
if (req.method == .GET or req.method == .CONNECT or req.method == .HEAD or req.method == .OPTIONS or req.method == .TRACE) break; if (req.method == .GET or req.method == .CONNECT or req.method == .HEAD or req.method == .OPTIONS or req.method == .TRACE) break;
// If Request has a method that can contain a body, check if Content-Length Header is set. // If Request has a method that can contain a body, check if Content-Length Header is set.