From 2b8c519b24dbaac69ecd5d5ed9fe2b1ef321aeff Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Fri, 29 Dec 2023 08:50:18 +0100 Subject: Update TODO; minor fixes --- TODO | 1 - source/kit/http1.h | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 97823a2..281b2ea 100644 --- a/TODO +++ b/TODO @@ -18,7 +18,6 @@ To-Do - System call, run process - Terminal - Sockets tests - - Parsing OpenGL interface - Utils - parse, print - String builder diff --git a/source/kit/http1.h b/source/kit/http1.h index f4e5fc6..043dcf6 100644 --- a/source/kit/http1.h +++ b/source/kit/http1.h @@ -16,8 +16,6 @@ extern "C" { #endif -#define KIT_HTTP1_CONTENT_TYPE \ - "Content-Type: text/plain; version=0.0.4; charset=utf-8"; #define KIT_HTTP1_NEWLINE "\r\n" #define KIT_HTTP1_SPACE " " #define KIT_HTTP1_HEADER_SEPARATOR ": " @@ -120,7 +118,7 @@ static kit_str_t kit_http1_tok_next(kit_http1_tok_t *tok, // - Return error status static void kit_http1_uri_init(kit_http1_uri_t *uri, kit_str_t input, kit_allocator_t *alloc) { - static const char port_80[] = "80"; + static const kit_str_t port_80 = { .size = 2, .values = "80" }; assert(uri != NULL); if (uri == NULL) @@ -155,7 +153,7 @@ static void kit_http1_uri_init(kit_http1_uri_t *uri, kit_str_t input, // - HTTPS default port 443 uri->port = kit_http1_tok_tail(&host_port_tok); if (uri->port.size == 0) - uri->port = SZ(port_80); + uri->port = port_80; uri->address = kit_http1_tok_next(&input_tok, SZ("?"), 1); uri->query_string = kit_http1_tok_next(&input_tok, SZ("#"), 1); @@ -194,6 +192,7 @@ static void kit_http1_uri_init(kit_http1_uri_t *uri, kit_str_t input, static void kit_http1_uri_destroy(kit_http1_uri_t *uri) { // TODO + // } static kit_str_t kit_http1_method_to_str(i32 method) { -- cgit v1.2.3