Skip to content

Commit

Permalink
https://github.com/froghui/yolanda/issues/43
Browse files Browse the repository at this point in the history
  • Loading branch information
hgaonice committed Apr 25, 2024
1 parent ea94381 commit b891fc4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chap-34/http_server01.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include <lib/http_server.h>
#include "lib/common.h"
#include "lib/event_loop.h"
#include <string.h>
#define _GNU_SOURCE

//数据读到buffer之后的callback
int onRequest(struct http_request *httpRequest, struct http_response *httpResponse) {
Expand Down
2 changes: 2 additions & 0 deletions chap-34/http_server_test.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "lib/http_request.h"
#include "lib/http_server.h"
#include "lib/http_response.h"
#include <string.h>
#define _GNU_SOURCE

char *data = "GET / HTTP/1.1\r\nHost: localhost:43211\r\nUser-Agent: curl/7.54.0\r\nAccept: */*\r\n\r\n";

Expand Down
2 changes: 2 additions & 0 deletions lib/buffer.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "buffer.h"
#include "common.h"
#include <string.h>
#define _GNU_SOURCE

const char *CRLF = "\r\n";

Expand Down
2 changes: 2 additions & 0 deletions lib/http_server.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <assert.h>
#include "http_server.h"
#include <string.h>
#define _GNU_SOURCE


//连接建立之后的callback
Expand Down

0 comments on commit b891fc4

Please sign in to comment.