summaryrefslogtreecommitdiff
path: root/source/kit/http1.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/kit/http1.h')
-rw-r--r--source/kit/http1.h7
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) {