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

49 lines
1.2 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
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;
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
};
struct liPhysical {
2008-06-30 10:25:01 +00:00
GString *path;
GString *doc_root;
GString *pathinfo;
};
struct liRequest {
liHttpMethod http_method;
2008-06-30 10:25:01 +00:00
GString *http_method_str;
liHttpVersion http_version;
2008-06-30 10:25:01 +00:00
liRequestUri uri;
2008-06-30 10:25:01 +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);
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