| 30 | #define COPY(x, y) ACL_SAFE_STRNCPY((x), (y), sizeof((x))) |
| 31 | |
| 32 | HttpServletRequest::HttpServletRequest(HttpServletResponse& res, |
| 33 | session* sess, socket_stream& stream, |
| 34 | const char* charset /* = NULL */, int body_limit /* = 102400 */) |
| 35 | : req_error_(HTTP_REQ_OK) |
| 36 | , res_(res) |
| 37 | , sess_(sess) |
| 38 | , http_session_(NULL) |
| 39 | , stream_(stream) |
| 40 | , body_limit_(body_limit) |
| 41 | , body_parsed_(false) |
| 42 | , cookies_inited_(false) |
| 43 | , client_(NULL) |
| 44 | , method_(HTTP_METHOD_UNKNOWN) |
| 45 | , localAddr_(NULL) |
| 46 | , remoteAddr_(NULL) |
| 47 | , request_type_(HTTP_REQUEST_NORMAL) |
| 48 | , parse_body_(true) |
| 49 | , mime_(NULL) |
| 50 | , body_(NULL) |
| 51 | , json_(NULL) |
| 52 | , xml_(NULL) |
| 53 | , readHeaderCalled_(false) |
| 54 | { |
| 55 | dbuf_internal_ = NEW dbuf_guard(1, 100); |
| 56 | dbuf_ = dbuf_internal_; |
| 57 | |
| 58 | cookie_name_ = dbuf_->dbuf_strdup("ACL_SESSION_ID"); |
| 59 | ACL_VSTREAM* in = stream.get_vstream(); |
| 60 | if (in == ACL_VSTREAM_IN) { |
| 61 | cgi_mode_ = true; |
| 62 | } else { |
| 63 | cgi_mode_ = false; |
| 64 | } |
| 65 | if (charset && *charset) { |
| 66 | localCharset_ = dbuf_->dbuf_strdup(charset); |
| 67 | } else { |
| 68 | localCharset_ = NULL; |
| 69 | } |
| 70 | rw_timeout_ = 60; |
| 71 | } |
| 72 | |
| 73 | HttpServletRequest::~HttpServletRequest(void) |
| 74 | { |
nothing calls this directly
no test coverage detected