//Limite maximum d'un champ du header #define MAX_FIELD_LEN 4096 //Défini le nombre maximum de champ dans un header #define MAX_HEADER_FIELDS 32 //Definit la taille maximum d'un upload en ko #define MAX_UPLOAD_SIZE 2048 //timeout d'une connexion en ms #define TIMEOUT 3000 //Définit le nombre maximum de thread simultané #define MAX_THREAD 50 //Asks for the response identical to the one that would correspond to a GET request, but without the response body. #define HEAD 1 //Requests a repr esentation of the specified resource. By far the most common method used on the Web today. #define GET 2 //Submits user data (e.g. from a HTML form) to the identified resource. The data is included in the body of the request. #define POST 3 //Uploads a representation of the specified resource. #define PUT 4 //Deletes the specified resource (rarely implemented). #define DELETE 5 //Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. #define TRACE 6 //Returns the HTTP methods that the server supports. This can be used to check the functionality of a web server. #define OPTIONS 7 //For use with a proxy that can change to being an SSL tunnel. #define CONNECT 8 #define ERROR_400 "

FUCK YOU

"; #define ERROR_500 "

INTERNAL SERVER ERROR

"; #define ERROR_501 "

NOT IMPLEMENTED

"; #ifndef WIN32 #define SOCKET_ERROR -1 #endif #define TRUE 1 #define FALSE 0 int createSocketListener(int); char * recvHeader(int); char * getField(char *, char *); int rmField(char **,char *); int setField(char**,char*,char*); int getMethod(char*); int getIpPortFromHost(char *,unsigned long *,int *); int myrecv(int, char * r, int, int, int); int mysend(int , char *, int , int , int);