Repository navigation
Commit d1c8abb
committed
Stop server observation on async completion only
Prior to this commit, `ServerHttpObservationFilter` stopped the
observation in both `AsyncListener.onTimeout` and `onComplete`.
As per the Servlet specification, `onTimeout` is not terminal: the
container then performs an error dispatch, which sets the final
response status, and always completes the async context afterwards.
Stopping the observation in `onTimeout` recorded the request before
that status was known and stopped it a second time in `onComplete`.
This commit stops the observation in `onComplete` only.
Closes gh-376271 parent 522ca1e commit d1c8abb
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- spring-web/src
- main/java/org/springframework/web/filter
- test/java/org/springframework/web/filter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
185 | 203 | | |
186 | 204 | | |
187 | 205 | | |
| |||
0 commit comments