In ServerReponse send(), HTTPServerRequestPart.body can be sent after HTTPServerRequestPart.end, causing an illegal instruction exception.
If an error happens during HTTPServerRequestPart.head, then handleError() will send an end. Then send() continues and tries to send a body. A precondition is then triggered.
In ServerReponse send(), HTTPServerRequestPart.body can be sent after HTTPServerRequestPart.end, causing an illegal instruction exception.
If an error happens during HTTPServerRequestPart.head, then handleError() will send an end. Then send() continues and tries to send a body. A precondition is then triggered.
Code: https://github.com/NozeIO/MicroExpress/blob/master/Sources/MicroExpress/ServerResponse.swift#L4 https://github.com/apple/swift-nio/blob/master/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift#L65