2
0
Fork 0
lighttpd2/include/lighttpd/request.h

57 lines
1.1 KiB
C
Raw Normal View History

2008-06-30 10:25:01 +00:00
#ifndef _LIGHTTPD_REQUEST_H_
#define _LIGHTTPD_REQUEST_H_
#ifndef _LIGHTTPD_BASE_H_
#error Please include <lighttpd/base.h> instead of this file
#endif
2008-06-30 10:25:01 +00:00
struct request_uri {
GString *raw;
2008-06-30 10:25:01 +00:00
GString *scheme;
GString *authority;
GString *path, *orig_path;
2008-06-30 10:25:01 +00:00
GString *query;
GString *host; /* without userinfo and port */
2008-06-30 10:25:01 +00:00
};
2008-06-30 11:38:52 +00:00
struct physical {
2008-06-30 10:25:01 +00:00
GString *path;
GString *basedir;
GString *doc_root;
GString *rel_path;
GString *pathinfo;
2008-06-30 11:38:52 +00:00
gboolean have_stat;
gboolean have_errno;
guint stat_errno;
struct stat stat; /* contains valid data only if have_stat is true */
2008-06-30 10:25:01 +00:00
};
struct request {
http_method_t http_method;
GString *http_method_str;
http_version_t http_version;
request_uri uri;
http_headers *headers;
2008-06-30 10:25:01 +00:00
/* Parsed headers: */
goffset content_length;
};
LI_API void request_init(request *req);
2008-08-05 15:08:32 +00:00
LI_API void request_reset(request *req);
LI_API void request_clear(request *req);
LI_API gboolean request_validate_header(connection *con);
2008-08-06 18:46:42 +00:00
2008-08-07 12:12:51 +00:00
LI_API void physical_init(physical *phys);
LI_API void physical_reset(physical *phys);
LI_API void physical_clear(physical *phys);
2008-06-30 10:25:01 +00:00
#endif