access-log does not output the original query string after the servlet request is forwarded with new query strings in EAP 7
Issue
When a servlet request is forward to a different path with a new query string, the request line attribute (%r
) does not output a query string of the original request in the access log.
For example, when the following dispatcher.forward()
is implemented in the application like the following:
RequestDispatcher dispatcher = request.getRequestDispatcher("/test?foo=bar");
dispatcher.forward(request, response);
then the following request is sent to the above code:
$ curl -v http://localhost:8080/example/?aaa=bbb
The access-log
should output the request line with the original query string (?aaa=bbb
), but it output with the new query string (?foo=bar
) of the forwarded request:
127.0.0.1 - - [10/Oct/2019:20:20:54 +0900] "GET /example/?foo=bar HTTP/1.1" 200 68
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.