include/httpd.h
raw| 1 | /* |
| 2 | * Copyright (c) 2005 Atheme Development Group |
| 3 | * Rights to this code are as documented in doc/LICENSE. |
| 4 | * |
| 5 | * Generic HTTP server |
| 6 | * |
| 7 | */ |
| 8 | |
| 9 | #ifndef HTTPD_H |
| 10 | #define HTTPD_H |
| 11 | |
| 12 | typedef struct path_handler_ path_handler_t; |
| 13 | |
| 14 | struct path_handler_ |
| 15 | { |
| 16 | const char *path; |
| 17 | void (*handler)(connection_t *, void *); |
| 18 | }; |
| 19 | |
| 20 | struct httpddata |
| 21 | { |
| 22 | char method[64]; |
| 23 | char filename[256]; |
| 24 | char *requestbuf; |
| 25 | char *replybuf; |
| 26 | int length; |
| 27 | int lengthdone; |
| 28 | bool connection_close; |
| 29 | bool correct_content_type; |
| 30 | bool expect_100_continue; |
| 31 | bool sent_reply; |
| 32 | }; |
| 33 | |
| 34 | #endif |
| 35 | |
| 36 | /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs ts=8 sw=8 noexpandtab |
| 37 | */ |