You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have time right now to fix this but these too tests show the issue:
func testContentLengthTooLongFails(){leturl=self.defaultHTTPBinURLPrefix +"/post"XCTAssertThrowsError(tryself.defaultClient.execute(request:Request(url: url,
body:.stream(length:10){ streamWriter in
streamWriter.write(.byteBuffer(ByteBuffer(string:"1")))})).wait()){ error in
// TODO: content-length wrong error.
}
// Quickly try another request and check that it works.
XCTAssertNoThrow(tryself.defaultClient.get(url:self.defaultHTTPBinURLPrefix +"/get").wait())}
// currently gets stuck because of #250 the server just never replies
func testContentLengthTooShortFails(){leturl=self.defaultHTTPBinURLPrefix +"/post"lettooLong="XBAD BAD BAD NOT HTTP/1.1\r\n\r\n"XCTAssertThrowsError(tryself.defaultClient.execute(request:Request(url: url,
body:.stream(length:1){ streamWriter in
streamWriter.write(.byteBuffer(ByteBuffer(string: tooLong)))})).wait()){ error in
// TODO: content-length wrong error.
}
// Quickly try another request and check that it works. If we by accident wrote some extra bytes into the
// stream (and reuse the connection) that could cause problems.
XCTAssertNoThrow(tryself.defaultClient.get(url:self.defaultHTTPBinURLPrefix +"/get").wait())}
This probably needs to be a blocker because with a connection pool, this is security relevant. We could end up sending private bytes for one request into the next request by accident.
The text was updated successfully, but these errors were encountered:
I don't have time right now to fix this but these too tests show the issue:
This probably needs to be a blocker because with a connection pool, this is security relevant. We could end up sending private bytes for one request into the next request by accident.
The text was updated successfully, but these errors were encountered: