Skip to content

Commit be5ea2f

Browse files
mariashgeofffranks
authored andcommitted
Add an option to enable concurrent reads and responses in HTTP/1
By default Go HTTP server consumes any unread request portion before writing the response for HTTP/1. This prevents handlers from reading request and writing response concurrently. This is set to false by default since it might be an unexpected behavior and cause deadlock for some handlers. See golang/go#15527 (comment)
1 parent d4d00f0 commit be5ea2f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

jobs/gorouter/spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ properties:
161161
router.enable_http2:
162162
description: Enables support for HTTP/2 ingress traffic to the Gorouter. Also enables the option to use the HTTP/2 protocol for traffic to specified backends.
163163
default: true
164+
router.enable_http1_concurrent_read_write:
165+
description: Enables concurrent request reads and response writes for HTTP/1 requests
166+
default: false
164167
router.min_tls_version:
165168
description: Minimum accepted version of TLS protocol. All versions above this, up to the max_tls_version, will also be accepted. Valid values are TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3.
166169
default: TLSv1.2

jobs/gorouter/templates/gorouter.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ end
438438

439439
params['disable_http'] = p('router.disable_http')
440440
params['enable_http2'] = p('router.enable_http2')
441+
params['enable_http1_concurrent_read_write'] = p('router.enable_http1_concurrent_read_write')
441442

442443
if p('router.ca_certs')
443444
params['ca_certs'] = get_valid_ca_certs

0 commit comments

Comments
 (0)