HTTP2 go away at the protocol level lets the request hang
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- swift
- Ambito
- networking
Direzione di ricerca
Inizia da Sources/AsyncHTTPClient/ConnectionPool/HTTP2/HTTP2IdleHandler.swift, in particolare dalla gestione del codice di errore GOAWAY di HTTP/2. Esegui il test di riproduzione testGoAwayFromServerDoesntHangRequest, che usa un body della request non vuoto e una deadline in un futuro lontano. Il lavoro è completato quando la request non rimane più bloccata e il test osserva l’errore lanciato previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We currently ignore the error code of the go away. I think if it is a protocol error we will never receive any further HTTP2Frame on the connection or any stream and need manually cancel all active streams. Maybe this is better handled at the nio http2 level but I'm not sure yet.
Reproducer:
func testGoAwayFromServerDoesntHangRequest() throws {
//try XCTSkipIf(true, "this currently hangs")
let bin = HTTPBin(.http2())
defer { XCTAssertNoThrow(try bin.shutdown()) }
let loggerFactor = StreamLogHandler.standardOutput(label:)
var bgLogger = Logger(label: "BG", factory: loggerFactor)
bgLogger.logLevel = .trace
let client = HTTPClient(
eventLoopGroupProvider: .createNew,
configuration: .init(certificateVerification: .none),
backgroundActivityLogger: bgLogger
)
defer { XCTAssertNoThrow(try client.syncShutdown()) }
var request = try HTTPClient.Request(url: bin.baseURL, method: .POST)
// add ~64 KB header
let headerValue = String(repeating: "0", count: 1024)
for headerID in 0..<64 {
request.headers.replaceOrAdd(name: "larg-header-\(headerID)", value: headerValue)
}
// non empty body is important to trigger this bug as we otherwise finish the request in a single flush
request.body = .byteBuffer(ByteBuffer(bytes: [0]))
var rqLogger = Logger(label: "RQ", factory: loggerFactor)
rqLogger.logLevel = .trace
XCTAssertThrows(try client.execute(request: request, deadline: .distantFuture, logger: rqLogger).wait())
}
- Lingua principale
- Swift
- Stelle
- 1.1k
- Fork
- 156
- Merge medio
- 1h 54m
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di swift-server/async-http-client
-
RequestBag keeps the request body after an early response with status >= 300Forse già presa @beshkenadze l’ha presa oggi. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
swift-server/async-http-client#941 ·
I maintainer di solito rispondono entro 1 giorno
-
HTTP/2 stream stays half-closed after an early response with status >= 300Forse già presa @beshkenadze l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
swift-server/async-http-client#940 ·
I maintainer di solito rispondono entro 1 giorno
-
Transaction keeps the request body after an early response with status >= 300Forse già presa @beshkenadze l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
swift-server/async-http-client#939 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
swift-server/async-http-client#938 ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid state: idleAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
swift-server/async-http-client#927 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di swift-server/async-http-client
Issue simili
-
accessibility help wanted macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
dorlugasigal/annotator#42 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
lugassawan/swe-workbench#823 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
swiftlang/indexstore-db#306 ·
-
AlertPlayground iOS build failure in Xcode 27/Swift 6.4Forse già presa @dfabulich l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
skiptools/skipapp-showcase#143 ·
-
host-ios R2 blocker Stability
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
paritytech/trinity-user-agents#1661 ·
I maintainer di solito rispondono entro 1 giorno