HTTP Request returns 200 OK but no content in response

前端 未结 2 548
梦毁少年i
梦毁少年i 2021-02-14 09:33

In developing a particular web site, I have an intermittent issue when loading the site in Firefox (haven\'t been able to compare in IE or Chrome). The site loads several javasc

相关标签:
2条回答
  • 2021-02-14 09:59

    You probably have a try catch block that is swallowing the error and producing no output. It might be logging the error somewhere.

    0 讨论(0)
  • 2021-02-14 10:21

    After a lot of investigation and debugging, I found out that the Atmosphere library was being allowed to manipulate a Response object that had been recycled and getting used for a later request. The affected Response was given a status of 200, content-length of 0, and it was committed such that no other modifications could be made. The unlucky request thread that is given this "corrupted" Response instance is unable to be used to provide the actual content.

    To prevent this modification from affecting the JBoss server, I added the following to the jboss.properties file:

    org.apache.catalina.connector.RECYCLE_FACADES=true
    

    Another option is to use a Security Manager. (See the Security section of this page, and the advice offered in the last few paragraphs of this page)

    This apparently prevents recycling of requests and responses, so we always get a fresh Response instance for each request.

    0 讨论(0)
提交回复
热议问题