diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-12-29 08:50:18 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-12-29 08:50:18 +0100 |
commit | 2b8c519b24dbaac69ecd5d5ed9fe2b1ef321aeff (patch) | |
tree | 72b5b1dd2eaf97e8b336a9cc252b047cc7c30093 /source | |
parent | 886e49da8c3d5b568394035b73ef60ee444c8ab0 (diff) | |
download | kit-2b8c519b24dbaac69ecd5d5ed9fe2b1ef321aeff.zip |
Update TODO; minor fixes
Diffstat (limited to 'source')
-rw-r--r-- | source/kit/http1.h | 7 |
1 files changed, 3 insertions, 4 deletions
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) { |