Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servlet filter is swallowing response body #18

Closed
whiskeysierra opened this issue Nov 3, 2015 · 0 comments · Fixed by #19
Closed

Servlet filter is swallowing response body #18

whiskeysierra opened this issue Nov 3, 2015 · 0 comments · Fixed by #19

Comments

@whiskeysierra
Copy link
Collaborator

I don't have a reproducible test case, but when enabling the Jolokia endpoint in a Spring Boot application (http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-jmx.html#production-ready-jolokia) it neither logs nor writes the original response body:

Issuing this request:

GET /jolokia/read/java.lang:type=Memory/HeapMemoryUsage/used HTTP/1.1
Cookie: JSESSIONID=PErsV8g5P12cKvCmMZ3L29fR
Authorization: XXX
Cache-Control: no-cache
Accept: */*
Connection: keep-alive
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/45.0.2454.101 Chrome/45.0.2454.101 Safari/537.36
Host: localhost:8080
Postman-Token: d7248d0c-1e58-409e-003d-d9fdd8c6850c
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8

will only log this response:

HTTP/1.1 200
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
Cache-Control: no-cache
Pragma: no-cache
Expires: Tue, 03 Nov 2015 11:11:06 GMT
X-Application-Context: application
Date: Tue, 03 Nov 2015 12:11:06 GMT
Content-Type: text/plain;charset=utf-8

When I disable the logbook filter the response is returned to the browser.

{
  "request": {
    "path": "used",
    "mbean": "java.lang:type=Memory",
    "attribute": "HeapMemoryUsage",
    "type": "read"
  },
  "value": 195264032,
  "timestamp": 1446552834,
  "status": 200
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant