Skip to content

Commit

Permalink
WeblogRequestMapper: Use already validated weblog handle for redirect…
Browse files Browse the repository at this point in the history
… logic.
  • Loading branch information
mbien committed Aug 27, 2021
1 parent ea8abe1 commit b443ee4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*/
public class WeblogRequestMapper implements RequestMapper {

private static Log log = LogFactory.getLog(WeblogRequestMapper.class);
private static final Log log = LogFactory.getLog(WeblogRequestMapper.class);

private static final String PAGE_SERVLET = "/roller-ui/rendering/page";
private static final String FEED_SERVLET = "/roller-ui/rendering/feed";
Expand Down Expand Up @@ -199,7 +199,7 @@ public boolean handleRequest(HttpServletRequest request, HttpServletResponse res
// this means someone referred to a weblog index page with the
// shortest form of url /<weblog> or /<weblog>/<locale> and we need
// to do a redirect to /<weblog>/ or /<weblog>/<locale>/
String redirectUrl = request.getRequestURI() + "/";
String redirectUrl = "/" + weblogHandle + "/";
if(request.getQueryString() != null) {
redirectUrl += "?"+request.getQueryString();
}
Expand Down

0 comments on commit b443ee4

Please sign in to comment.