Rev proxy working again
This commit is contained in:
@ -9,7 +9,38 @@
|
||||
#ifndef SESIMOS_FUNC_H
|
||||
#define SESIMOS_FUNC_H
|
||||
|
||||
#include "../server.h"
|
||||
#include "../lib/sock.h"
|
||||
#include "../lib/http.h"
|
||||
#include "../lib/uri.h"
|
||||
#include "../lib/config.h"
|
||||
#include "../lib/proxy.h"
|
||||
|
||||
typedef struct {
|
||||
sock socket;
|
||||
int req_num;
|
||||
unsigned char in_use: 1, s_keep_alive:1, c_keep_alive:1;
|
||||
char cc[3], host[256];
|
||||
char req_host[256], err_msg[256];
|
||||
char log_prefix[512];
|
||||
char _c_addr[INET6_ADDRSTRLEN + 1], _s_addr[INET6_ADDRSTRLEN + 1];
|
||||
struct timespec begin, end;
|
||||
http_req req;
|
||||
http_res res;
|
||||
http_uri uri;
|
||||
http_status_ctx status;
|
||||
http_status custom_status;
|
||||
int use_fastcgi, use_proxy;
|
||||
host_config_t *conf;
|
||||
FILE *file;
|
||||
long content_length;
|
||||
char msg_buf[8192], msg_content[1024];
|
||||
proxy_ctx_t *proxy;
|
||||
} client_ctx_t;
|
||||
|
||||
typedef struct {
|
||||
client_ctx_t *client;
|
||||
sock *s1, *s2, *s, *r;
|
||||
} ws_ctx_t;
|
||||
|
||||
void tcp_acceptor_func(client_ctx_t *ctx);
|
||||
|
||||
@ -23,7 +54,7 @@ void fastcgi_handler_func(client_ctx_t *ctx);
|
||||
|
||||
void proxy_handler_func(client_ctx_t *ctx);
|
||||
|
||||
void ws_frame_handler_func(client_ctx_t *ctx);
|
||||
void ws_frame_handler_func(ws_ctx_t *ctx);
|
||||
|
||||
int respond(client_ctx_t *ctx);
|
||||
|
||||
|
Reference in New Issue
Block a user