mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-27 16:24:07 +02:00
move http into http/
This commit is contained in:
parent
10fcc0fa51
commit
7d4dc46b80
@ -7,4 +7,5 @@
|
||||
-pedantic
|
||||
-pedantic-errors
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "db.h"
|
||||
#include "http_server.h"
|
||||
#include "http.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "../controllers.h"
|
||||
#include "../http_server.h"
|
||||
#include "../http.h"
|
||||
#include "../models_json.h"
|
||||
|
||||
void route_get_index(HttpCtx* ctx)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "../controllers.h"
|
||||
#include "../http_server.h"
|
||||
#include "../http.h"
|
||||
#include "../models_json.h"
|
||||
#include "../str_util.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "../controllers.h"
|
||||
#include "../http_server.h"
|
||||
#include "../http.h"
|
||||
#include "../models_json.h"
|
||||
#include "../str_util.h"
|
||||
#include <string.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "../controllers.h"
|
||||
#include "../http_server.h"
|
||||
#include "../http.h"
|
||||
#include "../models_json.h"
|
||||
#include "../str_util.h"
|
||||
#include <string.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "http_server.h"
|
||||
#include "../http.h"
|
||||
#include "../str_util.h"
|
||||
#include "http_server_internal.h"
|
||||
#include "str_util.h"
|
||||
#include <ctype.h>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
@ -269,7 +269,8 @@ static inline void worker_handle_request(Worker* worker, Client* client)
|
||||
(void)worker;
|
||||
|
||||
uint8_t* buffer = calloc(MAX_HEADER_BUFFER_SIZE, sizeof(char));
|
||||
ssize_t bytes_received = recv(client->file, buffer, MAX_HEADER_BUFFER_SIZE * sizeof(char), 0);
|
||||
ssize_t bytes_received
|
||||
= recv(client->file, buffer, MAX_HEADER_BUFFER_SIZE * sizeof(char), 0);
|
||||
|
||||
if (bytes_received == -1) {
|
||||
fprintf(stderr, "error: could not receive request\n");
|
||||
@ -312,7 +313,8 @@ static inline void worker_handle_request(Worker* worker, Client* client)
|
||||
|
||||
// HACK
|
||||
// TODO: We should treat the input as a stream rather than a block.
|
||||
// Look at either @camper0008's stream example or other HTTP-server implementations.
|
||||
// Look at either @camper0008's stream example or other HTTP-server
|
||||
// implementations.
|
||||
size_t defacto_length = strlen(body);
|
||||
int attempts = 0;
|
||||
const int arbitrary_max_attempts = 10;
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "collection.h"
|
||||
#include "http_server.h"
|
||||
#include "../collection.h"
|
||||
#include "../http.h"
|
||||
#include <bits/pthreadtypes.h>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
@ -1,6 +1,6 @@
|
||||
#include "controllers.h"
|
||||
#include "db_sqlite.h"
|
||||
#include "http_server.h"
|
||||
#include "http.h"
|
||||
#include "json.h"
|
||||
#include "models.h"
|
||||
#include "models_json.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user