diff --git a/common/socket_helper.c b/common/socket_helper.c index 928260f..7373029 100644 --- a/common/socket_helper.c +++ b/common/socket_helper.c @@ -54,6 +54,7 @@ static struct line_read_result read_line(const char *buffer, int buffer_size, st int name_size = header_delim - buffer; char *header_name = malloc((name_size + 1) * sizeof(char)); // Start of the buffer + the number of bytes read - 1 for the \r + // TODO: Support line-continued headers int value_size = (line_terminator - buffer) + line_length - 1; char *header_value = malloc((value_size + 1) * sizeof(char)); memcpy(header_name, buffer, name_size);