星期一, 11月 12, 2012

[Java] GZIP Filter 與 404 錯誤頁面的臭蟲

起因:
GZIPFilter壓縮遇到不存在的網頁會爆炸,如下所示:


這個網頁無法使用

http://serverip/test.jspddd 的網頁可能暫時無法使用或被永久移至新網址。
錯誤 330 (net::ERR_CONTENT_DECODING_FAILED): 未知的錯誤。


2012/11/13
目前尚未找到解法,不過透過HttpServletResponseWrapper目前竟然無法成功拿到各網頁的content,唯有在最後一層的Filter呼叫啊HttpServletResponseWrapper才有辦法拿到



Reference:
What is the simplest way to display httpServletResponse.sendError(403, “My Message”) status from JSTL
How to make a filter to detect if the user requested a not found page?

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails