Skip to content

Commit

Permalink
Add an option to enable concurrent reads and responses in HTTP/1
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mariash authored and geofffranks committed Feb 28, 2024
1 parent d4d00f0 commit be5ea2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jobs/gorouter/spec
Expand Up @@ -161,6 +161,9 @@ properties:
router.enable_http2:
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.
default: true
router.enable_http1_concurrent_read_write:
description: Enables concurrent request reads and response writes for HTTP/1 requests
default: false
router.min_tls_version:
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.
default: TLSv1.2
Expand Down
1 change: 1 addition & 0 deletions jobs/gorouter/templates/gorouter.yml.erb
Expand Up @@ -438,6 +438,7 @@ end

params['disable_http'] = p('router.disable_http')
params['enable_http2'] = p('router.enable_http2')
params['enable_http1_concurrent_read_write'] = p('router.enable_http1_concurrent_read_write')

if p('router.ca_certs')
params['ca_certs'] = get_valid_ca_certs
Expand Down

0 comments on commit be5ea2f

Please sign in to comment.