{"action":"created","issue":{"url":"https://api.github.com/repos/ziplet/ziplet/issues/5","repository_url":"https://api.github.com/repos/ziplet/ziplet","labels_url":"https://api.github.com/repos/ziplet/ziplet/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/ziplet/ziplet/issues/5/comments","events_url":"https://api.github.com/repos/ziplet/ziplet/issues/5/events","html_url":"https://github.com/ziplet/ziplet/issues/5","id":37173257,"node_id":"MDU6SXNzdWUzNzE3MzI1Nw==","number":5,"title":"java.lang.AssertionError in CompressingServletOutputStream.abortCompression","user":{"login":"chaostya","id":189311,"node_id":"MDQ6VXNlcjE4OTMxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/189311?v=4","gravatar_id":"","url":"https://api.github.com/users/chaostya","html_url":"https://github.com/chaostya","followers_url":"https://api.github.com/users/chaostya/followers","following_url":"https://api.github.com/users/chaostya/following{/other_user}","gists_url":"https://api.github.com/users/chaostya/gists{/gist_id}","starred_url":"https://api.github.com/users/chaostya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaostya/subscriptions","organizations_url":"https://api.github.com/users/chaostya/orgs","repos_url":"https://api.github.com/users/chaostya/repos","events_url":"https://api.github.com/users/chaostya/events{/privacy}","received_events_url":"https://api.github.com/users/chaostya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2014-07-04T14:52:35Z","updated_at":"2018-06-07T11:20:09Z","closed_at":null,"author_association":"NONE","body":"1. get response.getOutputStream()\n2. don't write to it anything\n3. set forbidden (in web.xml filter config) content type header e.g. response.setContentType(\"application/pdf\");\n4. add another header that would abort compression like response.addHeader(\"Cache-Control\", \"no-transform, max-age=3600\");\n\nBoom:\njava.lang.AssertionError\n        at com.github.ziplet.filter.compression.CompressingServletOutputStream.abortCompression(CompressingServletOutputStream.java:120)\n        at com.github.ziplet.filter.compression.CompressingHttpServletResponse.maybeAbortCompression(CompressingHttpServletResponse.java:195)\n        at com.github.ziplet.filter.compression.CompressingHttpServletResponse.addHeader(CompressingHttpServletResponse.java:108)\n\nand then Weblogic says:\njava.net.ProtocolException: Didn't meet stated Content-Length, wrote: '0' bytes instead of stated: '3750917' bytes.\n        at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)\n        at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)\n        at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)\n        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)\n        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)\n\nand response goes back to the client with empty body\n"},"comment":{"url":"https://api.github.com/repos/ziplet/ziplet/issues/comments/395385329","html_url":"https://github.com/ziplet/ziplet/issues/5#issuecomment-395385329","issue_url":"https://api.github.com/repos/ziplet/ziplet/issues/5","id":395385329,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTM4NTMyOQ==","user":{"login":"alarive","id":542679,"node_id":"MDQ6VXNlcjU0MjY3OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/542679?v=4","gravatar_id":"","url":"https://api.github.com/users/alarive","html_url":"https://github.com/alarive","followers_url":"https://api.github.com/users/alarive/followers","following_url":"https://api.github.com/users/alarive/following{/other_user}","gists_url":"https://api.github.com/users/alarive/gists{/gist_id}","starred_url":"https://api.github.com/users/alarive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alarive/subscriptions","organizations_url":"https://api.github.com/users/alarive/orgs","repos_url":"https://api.github.com/users/alarive/repos","events_url":"https://api.github.com/users/alarive/events{/privacy}","received_events_url":"https://api.github.com/users/alarive/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T11:20:09Z","updated_at":"2018-06-07T11:20:09Z","author_association":"NONE","body":"I ran into this issue too while writing Spring Boot tests.\r\n\r\nThis error happens when CompressingHttpServletResponse.getOutputStream gets called two times (which Spring does) and the stream should not be compressed.\r\n\r\n@yblpub : thresholdOutputStream.forceOutputStream1() will not fail since checkWriteState() is responsible for initiliazing thresholdOutputStream.\r\n\r\nMy opinion is that this assertion should simply be deleted."}}
{"actor":{"display_login":"alarive"}}