--- parser3/src/include/pa_request_info.h 2016/11/25 23:37:06 1.12 +++ parser3/src/include/pa_request_info.h 2017/02/07 22:00:36 1.14 @@ -1,14 +1,14 @@ /** @file Parser: request info class decl. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_REQUEST_INFO_H #define PA_REQUEST_INFO_H -#define IDENT_PA_REQUEST_INFO_H "$Id: pa_request_info.h,v 1.12 2016/11/25 23:37:06 moko Exp $" +#define IDENT_PA_REQUEST_INFO_H "$Id: pa_request_info.h,v 1.14 2017/02/07 22:00:36 moko Exp $" /// some information from web server class Request_info { @@ -31,14 +31,13 @@ public: const char* post_data; size_t post_size; //@} - // 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 + // see feature #1116 for details bool can_have_body(){ return method - && ( - strcasecmp(method, "POST") == 0 - || strcasecmp(method, "PUT") == 0 - ); + && strcasecmp(method, "GET") != 0 + && strcasecmp(method, "HEAD") != 0 + && strcasecmp(method, "TRACE") != 0; } static const char* strip_absolute_uri(const char *auri){