( nodeResponse: Http.ServerResponse, response: HttpServerResponse, chunk?: string | Uint8Array )
| 1255 | }) |
| 1256 | |
| 1257 | const end = ( |
| 1258 | nodeResponse: Http.ServerResponse, |
| 1259 | response: HttpServerResponse, |
| 1260 | chunk?: string | Uint8Array |
| 1261 | ): Effect.Effect<void> => { |
| 1262 | try { |
| 1263 | nodeResponse.end(chunk) |
| 1264 | return Effect.void |
| 1265 | } catch (defect) { |
| 1266 | return handleCause(nodeResponse, response)(Cause.die(defect)) |
| 1267 | } |
| 1268 | } |
| 1269 | |
| 1270 | // Check lengths before writing: Node's strictContentLength throws uncaught inside pipeline. |
| 1271 | // Call after `writeHead`, so a rejected head can still cancel an unlocked Web stream. |
no test coverage detected