google / google/guice

Bug in anonymous sub class of HttpServletRequestWrapper in doService()?

Open
#1,017 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

HI,

I thinks there is maybe a bug in the method getPathInfo() which calls getServletPath().
The problem is as we don't have any real Servlets here and only one real filter is installed in the servlet container, so getServletPath() will always return an empty string according to the documentation ( https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getServletPath-- ) because eveything wll be matched against /*

But guice-servlet users like expect the getServletPath to return something different as this call is made in computePath():
path = patternMatcher.extractPath(servletPath);

This call makes only sense when not an empty string is returned.

This broken behaviour makes it currently impossbile to run gerrit on any other servlet container than jetty 9.2 I guess.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.