-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathhttp_request.h
More file actions
29 lines (23 loc) · 814 Bytes
/
Copy pathhttp_request.h
File metadata and controls
29 lines (23 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef HTTP_REQUEST_H
#define HTTP_REQUEST_H
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#include "http_proxy.h"
#include "conf.h"
#define HTTP_HEAD_HOST_CACHE_SIZE 1024
struct http_request {
char *method, *U, *version;
char *host, *port, *H;
char *url, *uri;
int method_len, U_len, version_len;
int host_len, port_len, H_len;
int url_len, uri_len;
};
void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen);
extern char *replace(char *replace_memory, int *replace_memory_len, const char *src, const int src_len, const char *dest, const int dest_len);
char *request_head(conn_t * in, conf * configure);
extern int8_t copy_new_mem(char *src, int src_len, char **dest);
extern void errors(const char *msg);
#endif