Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Append port to Host header only if not port 80
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoliver committed Feb 29, 2016
1 parent 697127b commit c5abcad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Doctrine/CouchDB/HTTP/StreamClient.php
Expand Up @@ -92,8 +92,12 @@ protected function checkConnection($method, $path, $data, $headers)
}
if ($this->httpFilePointer == null) {
// TODO SSL support?
$host = $this->options['host'];
if ($this->options['port'] != 80) {
$host .= ":{$this->options['port']}";
}
$this->httpFilePointer = @fopen(
'http://' . $basicAuth . $this->options['host'] . ':' . $this->options['port'] . $path,
'http://' . $basicAuth . $host . $path,
'r',
false,
stream_context_create(
Expand Down

0 comments on commit c5abcad

Please sign in to comment.