开发者

Content-Type all of a sudden goes missing

Really strange issue has been occurring lately with two legacy Struts applications running on separate RedHat 5/Tomcat 6 servers. Some brief details:

  • App 1 is the front-facing application
  • App 2 is an ancillary application which serves as a file repository system
  • App 1 has an upload form which forwards to App 2
  • App 2 expects multipart/form-data to be part of the Content-Type when an upload occurs

Uploading will work fine for a while, but will all of a sudden fail. When I look in the logs, App 2 is reporting that the Content-Type is missing and as such, cannot process the upload request. Furthermore, once it goes missing, it doesn't reappear. All attempts to upload will fail from that point forward and what's even more odd is that the only way to remedy the issue is to restart Tomcat hosting App 1, not App 2.

Other Oddities

  • Code that implements the upload feature has not changed in over a year
  • Using Wireshark (tshark) to sniff TCP packets
    • The Content-Type properly populated on the HTTP Request being sent from App1
    • Although Wireshark reports a malformed packet, the Content-Type is present on the HTTP Request r开发者_开发问答eceived on App2

Any ideas why this could be happening?


I would suspect there is some sort of state change on App1 which is causing it to no longer user the Content-Type header in requests to App2. Without seeing the code there is little more that anyone could tell you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜