2008-06-30 10:25:01 +00:00
|
|
|
#ifndef _LIGHTTPD_REQUEST_H_
|
|
|
|
#define _LIGHTTPD_REQUEST_H_
|
|
|
|
|
2008-10-28 21:11:50 +00:00
|
|
|
#ifndef _LIGHTTPD_BASE_H_
|
2008-11-16 20:33:53 +00:00
|
|
|
#error Please include <lighttpd/base.h> instead of this file
|
2008-10-28 21:11:50 +00:00
|
|
|
#endif
|
2008-07-01 18:56:59 +00:00
|
|
|
|
2009-07-08 19:06:07 +00:00
|
|
|
struct liRequestUri {
|
2009-09-13 15:45:41 +00:00
|
|
|
GString *raw; /* may include scheme and authority before path_raw */
|
|
|
|
GString *raw_path, *raw_orig_path; /* not decoded path with querystring */
|
2008-06-30 10:25:01 +00:00
|
|
|
|
|
|
|
GString *scheme;
|
2009-09-13 15:45:41 +00:00
|
|
|
GString *authority; /* authority: may include auth and ports and hostname trailing dots */
|
|
|
|
GString *path;
|
2008-06-30 10:25:01 +00:00
|
|
|
GString *query;
|
2008-08-09 15:20:12 +00:00
|
|
|
|
2009-09-13 15:45:41 +00:00
|
|
|
GString *host; /* without userinfo and port and trailing dots */
|
2008-06-30 10:25:01 +00:00
|
|
|
};
|
|
|
|
|
2009-07-08 19:06:07 +00:00
|
|
|
struct liPhysical {
|
2008-06-30 10:25:01 +00:00
|
|
|
GString *path;
|
|
|
|
GString *doc_root;
|
|
|
|
GString *pathinfo;
|
|
|
|
};
|
|
|
|
|
2009-07-08 19:06:07 +00:00
|
|
|
struct liRequest {
|
|
|
|
liHttpMethod http_method;
|
2008-06-30 10:25:01 +00:00
|
|
|
GString *http_method_str;
|
2009-07-08 19:06:07 +00:00
|
|
|
liHttpVersion http_version;
|
2008-06-30 10:25:01 +00:00
|
|
|
|
2009-07-08 19:06:07 +00:00
|
|
|
liRequestUri uri;
|
2008-06-30 10:25:01 +00:00
|
|
|
|
2009-07-08 19:06:07 +00:00
|
|
|
liHttpHeaders *headers;
|
2008-06-30 10:25:01 +00:00
|
|
|
/* Parsed headers: */
|
2009-09-13 15:46:02 +00:00
|
|
|
goffset content_length; /* -1 if not specified */
|
2008-06-30 10:25:01 +00:00
|
|
|
};
|
|
|
|
|
2009-07-09 20:17:24 +00:00
|
|
|
LI_API void li_request_init(liRequest *req);
|
|
|
|
LI_API void li_request_reset(liRequest *req);
|
|
|
|
LI_API void li_request_clear(liRequest *req);
|
2008-07-01 18:56:59 +00:00
|
|
|
|
2009-07-09 20:17:24 +00:00
|
|
|
LI_API gboolean li_request_validate_header(liConnection *con);
|
2008-08-06 18:46:42 +00:00
|
|
|
|
2009-07-09 20:17:24 +00:00
|
|
|
LI_API void li_physical_init(liPhysical *phys);
|
|
|
|
LI_API void li_physical_reset(liPhysical *phys);
|
|
|
|
LI_API void li_physical_clear(liPhysical *phys);
|
2008-08-07 12:12:51 +00:00
|
|
|
|
2008-06-30 10:25:01 +00:00
|
|
|
#endif
|