2008-06-24 19:19:20 +00:00
|
|
|
#ifndef _LIGHTTPD_BASE_H_
|
|
|
|
#define _LIGHTTPD_BASE_H_
|
|
|
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
2008-08-06 22:26:17 +00:00
|
|
|
#define CONST_STR_LEN(x) (x), (x) ? sizeof(x) - 1 : 0
|
2008-06-24 19:19:20 +00:00
|
|
|
|
2008-08-06 22:26:17 +00:00
|
|
|
#define GSTR_LEN(x) (x) ? (x)->str : "", (x) ? (x)->len : 0
|
2008-08-13 19:50:07 +00:00
|
|
|
#define GSTR_SAFE_STR(x) ((x && x->str) ? x->str : "(null)")
|
2008-08-06 18:46:42 +00:00
|
|
|
|
2008-08-07 20:52:53 +00:00
|
|
|
/* we don't use ev_init for now (stupid alias warnings), as ev_init
|
|
|
|
* just does set some values to zero and calls ev_set_cb.
|
|
|
|
* But every structure we allacote is initialized with zero, so we don't care
|
|
|
|
* about that.
|
|
|
|
* If this ever changes, we can easily use ev_init again.
|
|
|
|
*/
|
|
|
|
#define my_ev_init(ev, cb) ev_set_cb(ev, cb)
|
|
|
|
|
2008-08-06 18:46:42 +00:00
|
|
|
typedef enum {
|
|
|
|
HTTP_TRANSFER_ENCODING_IDENTITY,
|
|
|
|
HTTP_TRANSFER_ENCODING_CHUNKED
|
|
|
|
} transfer_encoding_t;
|
|
|
|
|
2008-06-24 19:19:20 +00:00
|
|
|
struct server;
|
|
|
|
typedef struct server server;
|
|
|
|
|
|
|
|
struct connection;
|
|
|
|
typedef struct connection connection;
|
|
|
|
|
2008-07-20 16:28:58 +00:00
|
|
|
|
|
|
|
#include "server.h"
|
2008-06-30 10:25:01 +00:00
|
|
|
#include "actions.h"
|
2008-07-24 11:25:40 +00:00
|
|
|
#include "options.h"
|
2008-07-23 19:34:19 +00:00
|
|
|
#include "plugin.h"
|
2008-06-30 10:25:01 +00:00
|
|
|
#include "request.h"
|
2008-08-06 18:46:42 +00:00
|
|
|
#include "response.h"
|
2008-07-18 22:38:33 +00:00
|
|
|
#include "log.h"
|
2008-06-28 18:37:28 +00:00
|
|
|
|
2008-07-20 16:28:58 +00:00
|
|
|
#include "connection.h"
|
2008-06-28 18:37:28 +00:00
|
|
|
|
2008-08-13 17:57:19 +00:00
|
|
|
|
2008-07-20 16:28:58 +00:00
|
|
|
#define SERVER_VERSION ((guint) 0x01FF0000)
|
2008-07-17 19:39:29 +00:00
|
|
|
|
2008-06-24 19:19:20 +00:00
|
|
|
#endif
|