Subversion Repositories Tewi

Rev

Rev 32 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32 Rev 43
Line 1... Line 1...
1
/* $Id: tw_http.h 32 2024-09-16 12:42:19Z nishi $ */
1
/* $Id: tw_http.h 43 2024-09-18 09:19:03Z nishi $ */
2
 
2
 
3
#ifndef __TW_HTTP_H__
3
#ifndef __TW_HTTP_H__
4
#define __TW_HTTP_H__
4
#define __TW_HTTP_H__
5
 
5
 
6
#include <stdbool.h>
6
#include <stdbool.h>
7
 
7
 
-
 
8
#include "../config.h"
-
 
9
 
8
struct tw_http_request {
10
struct tw_http_request {
9
	char* method;
11
	char* method;
10
	char* path;
12
	char* path;
11
	char* query;
13
	char* query;
12
	char* version;
14
	char* version;
Line 19... Line 21...
19
	int status;
21
	int status;
20
	bool _processed; /* Internal parameter */
22
	bool _processed; /* Internal parameter */
21
};
23
};
22
 
24
 
23
#ifdef SOURCE
25
#ifdef SOURCE
-
 
26
#ifndef NO_SSL
24
#include <openssl/ssl.h>
27
#include <openssl/ssl.h>
-
 
28
#endif
25
void tw_free_request(struct tw_http_request* req);
29
void tw_free_request(struct tw_http_request* req);
-
 
30
#ifndef NO_SSL
26
int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
31
int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
-
 
32
#else
-
 
33
int tw_http_parse(void* ssl, int sock, struct tw_http_request* req);
-
 
34
#endif
27
#endif
35
#endif
28
 
36
 
29
#endif
37
#endif