Commit 61a3b01
committed
CLDSRV-894: fix turn-around time for 0-byte PutObject/UploadPart
The previous fix attached a `request.on('end', ...)` listener to set
startTurnAroundTime. For non-empty uploads the downstream API handler
consumes the body, which drives the stream to emit 'end'. For 0-byte
uploads nothing consumes the stream, so 'end' never fires and
startTurnAroundTime stays undefined, causing the access log to render
turn-around time as '-'.
Detect Content-Length: 0 and set startTurnAroundTime synchronously in
that case; keep the 'end' listener for the non-empty path.1 parent 638c986 commit 61a3b01
2 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
271 | 279 | | |
272 | 280 | | |
273 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
135 | 150 | | |
136 | 151 | | |
137 | 152 | | |
| |||
0 commit comments