Annotation of parser3/src/include/pa_request_info.h, revision 1.8
1.2 paf 1: /** @file
2: Parser: request info class decl.
3:
1.7 moko 4: Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
1.2 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
6: */
7:
8: #ifndef PA_REQUEST_INFO_H
9: #define PA_REQUEST_INFO_H
10:
1.8 ! misha 11: #define IDENT_PA_REQUEST_INFO_H "$Id: pa_request_info.h,v 1.7 2012/03/16 09:24:10 moko Exp $"
1.2 paf 12:
13: /// some information from web server
14: class Request_info {
15: public:
16: //@{ these filled by Request class user
17: const char* document_root;
18: const char* path_translated;
19: const char* method;
20: const char* query_string;
21: const char* uri;
22: const char* content_type;
23: size_t content_length;
24: const char* cookie;
1.6 misha 25:
26: char** argv;
27: int args_skip;
1.2 paf 28: bool mail_received;
29: //@}
30: //@{ these are filed by Request class itself: user's post data
31: const char* post_data; size_t post_size;
32: //@}
1.8 ! misha 33:
! 34: // misha@ Probably it's a good idea to move this method into targets, but de facto the only POST and PUT can have the body and all targets should support it
! 35: bool can_have_body(){
! 36: return
! 37: method
! 38: && (
! 39: strcasecmp(method, "POST") == 0
! 40: || strcasecmp(method, "PUT") == 0
! 41: );
! 42: }
1.2 paf 43: };
44:
45: #endif
E-mail: