fix: HTTP/1.0 connection not closing causes ab benchmark to hang

- Add HTTP version detection in parse_http_request_usockets
- Return Connection: close header for HTTP/1.0 requests
- Call shutdown() for graceful connection close after HTTP/1.0 response
- Fix missing is_http11 parameter in WebSocket upgrade handler
- Support HTTP/1.0 with Connection: Keep-Alive header (ab -k mode)
- Optimize: only check Connection header value for keep-alive (like Go net/http)

Root cause: ab uses HTTP/1.0 by default, but server always returned
Connection: keep-alive, causing ab to wait for server to close connection.
This commit is contained in:
meiseayoung
2026-01-06 16:36:07 +08:00
parent 22e8dd4548
commit 0a4e5d50f3
2 changed files with 126 additions and 19 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
Module {
name: 'hono'
description: 'A high-performance V language web framework inspired by Hono.js, featuring hybrid routing, LRU cache, middleware support, and more.'
version: '0.7.6'
version: '0.7.7'
license: 'MIT'
dependencies: []
}