feat: separate lander code into separate module
This commit is contained in:
parent
7af4be12ff
commit
ff0795bb55
11 changed files with 114 additions and 106 deletions
|
|
@ -132,7 +132,7 @@ typedef enum http_response_body_type {
|
|||
} http_response_body_type;
|
||||
|
||||
typedef struct http_response {
|
||||
http_response_type type;
|
||||
http_response_type status;
|
||||
const char *head;
|
||||
size_t head_len;
|
||||
size_t head_written;
|
||||
|
|
|
|||
8
include/lander.h
Normal file
8
include/lander.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef LANDER
|
||||
#define LANDER
|
||||
|
||||
#include "http_loop.h"
|
||||
|
||||
extern http_route lander_routes[2];
|
||||
|
||||
#endif
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
const static char charset[] =
|
||||
static const char charset[] =
|
||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
const static size_t charset_len = sizeof(charset) - 1;
|
||||
static const size_t charset_len = sizeof(charset) - 1;
|
||||
|
||||
// Length of randomly generated keys
|
||||
#define RANDOM_KEY_LENGTH_SHORT 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue