| Revision | 85 (tree) |
|---|---|
| Time | 2015-08-23 13:53:34 |
| Author | t_nakayama1971 |
(empty log message)
| @@ -12,13 +12,13 @@ | ||
| 12 | 12 | import javax.servlet.http.HttpServletResponse; |
| 13 | 13 | import javax.servlet.http.HttpSession; |
| 14 | 14 | |
| 15 | +import org.apache.logging.log4j.LogManager; | |
| 16 | + | |
| 15 | 17 | import online.filter.helper.DuplicateBodyResponse; |
| 16 | 18 | import online.filter.helper.DuplicateHeaderWrapper; |
| 17 | 19 | import online.filter.helper.InterceptResponseWrapper; |
| 18 | 20 | import online.listener.SessionMutexListener; |
| 19 | 21 | |
| 20 | -import org.apache.logging.log4j.LogManager; | |
| 21 | - | |
| 22 | 22 | /** |
| 23 | 23 | * 単一仮想URLフィルター |
| 24 | 24 | * |
| @@ -113,11 +113,7 @@ | ||
| 113 | 113 | DuplicateBodyResponse dbr = DuplicateBodyResponse.class.cast( |
| 114 | 114 | session.getAttribute(this.path)); |
| 115 | 115 | if (dbr != null) { |
| 116 | - try { | |
| 117 | - dbr.copyResponse(response); | |
| 118 | - } catch (IOException ex) { | |
| 119 | - LogManager.getLogger().info(ex.getMessage()); | |
| 120 | - } | |
| 116 | + dbr.copyResponse(response); | |
| 121 | 117 | return true; |
| 122 | 118 | } |
| 123 | 119 | } |
| @@ -139,20 +139,23 @@ | ||
| 139 | 139 | * レスポンス複製処理 |
| 140 | 140 | * |
| 141 | 141 | * @param response 複製対象レスポンス |
| 142 | - * @throws IOException IO例外 | |
| 143 | 142 | */ |
| 144 | - public void copyResponse(final HttpServletResponse response) throws IOException { | |
| 143 | + public void copyResponse(final HttpServletResponse response) { | |
| 145 | 144 | if (response != null) { |
| 146 | - this.dhr.copyResponse(response); | |
| 145 | + try { | |
| 146 | + this.dhr.copyResponse(response); | |
| 147 | 147 | |
| 148 | - // キャラクタ配列ライタ | |
| 149 | - if (this.charWriter != null) { | |
| 150 | - response.getWriter().write(this.charWriter.toString()); | |
| 148 | + // キャラクタ配列ライタ | |
| 149 | + if (this.charWriter != null) { | |
| 150 | + response.getWriter().write(this.charWriter.toString()); | |
| 151 | + } | |
| 152 | + // 出力ストリーム | |
| 153 | + if (this.dow != null) { | |
| 154 | + response.getOutputStream().print(this.dow.toString()); | |
| 155 | + } | |
| 156 | + } catch (final IOException ex) { | |
| 157 | + LogManager.getLogger().info(ex.getMessage()); | |
| 151 | 158 | } |
| 152 | - // 出力ストリーム | |
| 153 | - if (this.dow != null) { | |
| 154 | - response.getOutputStream().print(this.dow.toString()); | |
| 155 | - } | |
| 156 | 159 | } |
| 157 | 160 | } |
| 158 | 161 |
| @@ -17,16 +17,13 @@ | ||
| 17 | 17 | import javax.servlet.http.HttpServletResponse; |
| 18 | 18 | import javax.servlet.http.HttpSession; |
| 19 | 19 | |
| 20 | +import core.config.Factory; | |
| 21 | +import core.util.NumberUtil; | |
| 22 | +import core.util.bean.Pair; | |
| 20 | 23 | import online.filter.helper.DuplicateBodyResponse; |
| 21 | 24 | import online.filter.helper.DuplicateHeaderWrapper; |
| 22 | 25 | import online.listener.SessionMutexListener; |
| 23 | 26 | |
| 24 | -import org.apache.logging.log4j.LogManager; | |
| 25 | - | |
| 26 | -import core.config.Factory; | |
| 27 | -import core.util.NumberUtil; | |
| 28 | -import core.util.bean.Pair; | |
| 29 | - | |
| 30 | 27 | /** |
| 31 | 28 | * RedirectRequestフィルタ |
| 32 | 29 | * |
| @@ -133,16 +130,12 @@ | ||
| 133 | 130 | Pair<LocalDateTime, DuplicateBodyResponse> pair = Pair.class.cast( |
| 134 | 131 | session.getAttribute(location)); |
| 135 | 132 | if (pair != null) { |
| 136 | - try { | |
| 137 | - pair.right().copyResponse(response); | |
| 138 | - if (0 != pair.right().getHeader().getStatus()) { | |
| 139 | - session.removeAttribute(location); | |
| 140 | - if (list != null) { | |
| 141 | - list.remove(location); | |
| 142 | - } | |
| 133 | + pair.right().copyResponse(response); | |
| 134 | + if (0 != pair.right().getHeader().getStatus()) { | |
| 135 | + session.removeAttribute(location); | |
| 136 | + if (list != null) { | |
| 137 | + list.remove(location); | |
| 143 | 138 | } |
| 144 | - } catch (final IOException ex) { | |
| 145 | - LogManager.getLogger().info(ex.getMessage()); | |
| 146 | 139 | } |
| 147 | 140 | return true; |
| 148 | 141 | } |