Subversion Repositories Tewi

Rev

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

Rev 17 Rev 20
Line 1... Line 1...
1
/* $Id: tw_http.h 17 2024-09-13 17:41:07Z nishi $ */
1
/* $Id: tw_http.h 20 2024-09-14 09:59:15Z 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>
-
 
7
 
6
struct tw_http_request {
8
struct tw_http_request {
7
	char* method;
9
	char* method;
8
	char* path;
10
	char* path;
-
 
11
	char* query;
9
	char* version;
12
	char* version;
10
	char** headers;
13
	char** headers;
11
	char* body;
14
	char* body;
12
};
15
};
13
 
16
 
14
struct tw_http_response {
17
struct tw_http_response {
15
	char** headers;
18
	char** headers;
-
 
19
	int status;
-
 
20
	bool _processed; /* Internal parameter */
16
};
21
};
17
 
22
 
18
#ifdef SOURCE
23
#ifdef SOURCE
19
#include <openssl/ssl.h>
24
#include <openssl/ssl.h>
20
int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
25
int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);