CPPSERV


Home Projects Jobs Clientele Contact

cppserv


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fixed src/container/HttpServletRequestImpl.cpp



NACK. See below.

Sergey wrote:
> From: Sergey Jukov <sergey@total-knowledge.com>
> @@ -76,6 +76,8 @@ HttpServletRequestImpl::~HttpServletRequ
>  void container::HttpServletRequestImpl::getHeaders()
>  {
>  //Use stringstream here to parse...
> +
> +
>   
Please don't submit indentation/white space changes along with content
changes.

> -	std::string servPath(getServletPath() + '/');
> -	i=uri.find(servPath);
> +	i=uri.find(servletName);
>  	if(i!=std::string::npos){
> -		pathInfo=uri.substr(i + servPath.length());
> +		pathInfo=uri.substr(i + servletName.length());
>   
Servlet name can appear in path more then once. You need full context path
here. Not to mention this is how official documentation says it should be.

If there is any bug related to getPathInfo(), it'd be in how context
path is formed,
and how it's mapped to actual URL used.

-- 
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com


Authoright © Total Knowledge: 2001-2008