Skip to content

Commit

Permalink
Fix ALPN whitespace
Browse files Browse the repository at this point in the history
Fixes amphp/http-client#255.

Noticed while comparing the TLS handshake with Chrome's TLS handshake.
  • Loading branch information
kelunik committed Feb 27, 2020
1 parent 7083250 commit 020b652
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ClientTlsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public function toStreamContextArray(): array
}

if (!empty($this->alpnProtocols)) {
$options['alpn_protocols'] = \implode(', ', $this->alpnProtocols);
$options['alpn_protocols'] = \implode(',', $this->alpnProtocols);
}

return ['ssl' => $options];
Expand Down
2 changes: 1 addition & 1 deletion src/ServerTlsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function toStreamContextArray(): array
];

if (!empty($this->alpnProtocols)) {
$options['alpn_protocols'] = \implode(', ', $this->alpnProtocols);
$options['alpn_protocols'] = \implode(',', $this->alpnProtocols);
}

if ($this->defaultCertificate !== null) {
Expand Down

0 comments on commit 020b652

Please sign in to comment.