63 lines
586 B
C
63 lines
586 B
C
|
|
#ifndef _request
|
||
|
|
|
||
|
|
#define _request
|
||
|
|
|
||
|
|
|
||
|
|
// Macros
|
||
|
|
|
||
|
|
#define BUFFER_SIZE 1024
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#include "stdlib.h"
|
||
|
|
|
||
|
|
extern char * __ClassNames[];
|
||
|
|
|
||
|
|
|
||
|
|
// Includes
|
||
|
|
|
||
|
|
#include "headers.h"
|
||
|
|
|
||
|
|
#include "stdlib.h"
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct request{
|
||
|
|
|
||
|
|
char * connection;
|
||
|
|
|
||
|
|
char * address;
|
||
|
|
|
||
|
|
int port;
|
||
|
|
|
||
|
|
char * url;
|
||
|
|
|
||
|
|
char * method;
|
||
|
|
|
||
|
|
char * version;
|
||
|
|
|
||
|
|
char * mimeType;
|
||
|
|
|
||
|
|
char * extension;
|
||
|
|
|
||
|
|
struct headerManager * headers;
|
||
|
|
|
||
|
|
|
||
|
|
} request;
|
||
|
|
|
||
|
|
void request_constructor( request * this );
|
||
|
|
|
||
|
|
void request_free( request * this );
|
||
|
|
|
||
|
|
request request_new( );
|
||
|
|
|
||
|
|
request * request_newPointer( );
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct request request;
|
||
|
|
|
||
|
|
|
||
|
|
|