diff --git a/Makefile b/Makefile index 295f820..c9c8a03 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -example_simple: example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o stream_buffer.o buffer.o - clang++ -std=gnu++2a -o example_simple example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o stream_buffer.o buffer.o -lgflags -lglog -lpthread +example_simple: example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o fastcgi_parse.o stream_buffer.o buffer.o + clang++ -std=gnu++2a -o example_simple example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o fastcgi_parse.o stream_buffer.o buffer.o -lgflags -lglog -lpthread clean: rm --force exmaple_simple *.o diff --git a/fastcgi_parse.cpp b/fastcgi_parse.cpp new file mode 100644 index 0000000..7964ccd --- /dev/null +++ b/fastcgi_parse.cpp @@ -0,0 +1,7 @@ +#include "fastcgi_parse.h" + +FastCGIHeader::FastCGIHeader(uint8_t type_in, uint16_t request_id, uint16_t content_length) + : type(type_in) { + SetRequestId(request_id); + SetContentLength(content_length); +} diff --git a/fastcgi_parse.h b/fastcgi_parse.h index d2d58de..733a0d9 100644 --- a/fastcgi_parse.h +++ b/fastcgi_parse.h @@ -3,11 +3,7 @@ #include struct FastCGIHeader { - FastCGIHeader(uint8_t type_in, uint16_t request_id, uint16_t content_length) - : type(type_in) { - SetRequestId(request_id); - SetContentLength(content_length); - } + FastCGIHeader(uint8_t type_in, uint16_t request_id, uint16_t content_length); uint8_t version = 1; uint8_t type;