{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6052","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6052/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6052/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6052/events","html_url":"https://github.com/spring-projects/spring-boot/issues/6052","id":157136632,"number":6052,"title":"Setting out of bound HTTP status in ContentCachingResponseWrapper blocks thread and prints no warning","user":{"login":"abhijitsarkar","id":1302775,"avatar_url":"https://avatars.githubusercontent.com/u/1302775?v=3","gravatar_id":"","url":"https://api.github.com/users/abhijitsarkar","html_url":"https://github.com/abhijitsarkar","followers_url":"https://api.github.com/users/abhijitsarkar/followers","following_url":"https://api.github.com/users/abhijitsarkar/following{/other_user}","gists_url":"https://api.github.com/users/abhijitsarkar/gists{/gist_id}","starred_url":"https://api.github.com/users/abhijitsarkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhijitsarkar/subscriptions","organizations_url":"https://api.github.com/users/abhijitsarkar/orgs","repos_url":"https://api.github.com/users/abhijitsarkar/repos","events_url":"https://api.github.com/users/abhijitsarkar/events{/privacy}","received_events_url":"https://api.github.com/users/abhijitsarkar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":{"login":"bclozel","id":103264,"avatar_url":"https://avatars.githubusercontent.com/u/103264?v=3","gravatar_id":"","url":"https://api.github.com/users/bclozel","html_url":"https://github.com/bclozel","followers_url":"https://api.github.com/users/bclozel/followers","following_url":"https://api.github.com/users/bclozel/following{/other_user}","gists_url":"https://api.github.com/users/bclozel/gists{/gist_id}","starred_url":"https://api.github.com/users/bclozel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bclozel/subscriptions","organizations_url":"https://api.github.com/users/bclozel/orgs","repos_url":"https://api.github.com/users/bclozel/repos","events_url":"https://api.github.com/users/bclozel/events{/privacy}","received_events_url":"https://api.github.com/users/bclozel/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-05-27T06:09:28Z","updated_at":"2016-05-28T08:58:02Z","closed_at":"2016-05-27T08:50:02Z","body":"Wrapping the response with a `ContentCachingResponseWrapper` and setting the HTTP status to out of bound value causes the thread to hang until it times out. No warnings are logged in the application logs. I found this the hard way when I mistakenly set the HTTP status to 6 and spent several hours trying to troubleshoot the issue.\r\n\r\nTo reproduce the problem, extract the attached zip file, navigate to the base directory and run `./gradlew clean bootRepackage && java -jar ./build/libs/poc-1.0-SNAPSHOT.jar`. Then issue a curl request `curl -v \"http://localhost:8080\"`\r\n\r\nUsing Spring Boot version 1.3.5.RELEASE.\r\n[poc.zip](https://github.com/spring-projects/spring-boot/files/285825/poc.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/222298210","html_url":"https://github.com/spring-projects/spring-boot/issues/6052#issuecomment-222298210","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6052","id":222298210,"user":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T08:58:02Z","updated_at":"2016-05-28T08:58:02Z","body":">  A public API is responsible for it's own data validation.\r\n\r\nThe API in question here is the Servlet API.\r\n\r\n`ContentCachingResponseWrapper` subclasses `HttpResponseWrapper` which is part of the Servlet API and `setStatus(int)` is declared on the Servlet API's `HttpServletResponse` interface which `HttpResponseWrapper` implements."}}
{"actor":{"display_login":"wilkinsona"}}