Commit d73b5da
committed
fix(appsec): move BlockingException inside brf guard in all remaining paths
The content path in Netty and both the filenames and content paths in
Tomcat were setting the BlockingException outside the if (brf != null)
block, meaning the exception would be thrown even when no blocking
response had actually been committed. Align all three with the canonical
pattern: tryCommitBlockingResponse + effectivelyBlocked + exception
assignment all inside if (brf != null).
The Netty body-processed path intentionally still omits effectivelyBlocked()
because tryCommitBlockingResponse() closes the Netty span synchronously in
the test environment, making a subsequent effectivelyBlocked() call fail.1 parent a1a267d commit d73b5da
2 files changed
Lines changed: 3 additions & 3 deletions
File tree
- dd-java-agent/instrumentation
- netty/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41
- tomcat/tomcat-appsec/tomcat-appsec-7.0/src/main/java/datadog/trace/instrumentation/tomcat7
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
195 | 196 | | |
196 | | - | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | | - | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
167 | 168 | | |
168 | | - | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
0 commit comments