| @@ 152-155 (lines=4) @@ | ||
| 149 | } |
|
| 150 | ||
| 151 | // Authentication, if needed |
|
| 152 | if (isset($this->options['userauth']) && isset($this->options['passwordauth'])) |
|
| 153 | { |
|
| 154 | $request[] = 'Authorization: Basic ' . base64_encode($this->options['userauth'] . ':' . $this->options['passwordauth']); |
|
| 155 | } |
|
| 156 | ||
| 157 | // Set any custom transport options |
|
| 158 | if (isset($this->options['transport.socket'])) |
|
| @@ 142-145 (lines=4) @@ | ||
| 139 | } |
|
| 140 | ||
| 141 | // If authentication details are provided, add those as well |
|
| 142 | if (isset($this->options['proxy.user']) && isset($this->options['proxy.password'])) |
|
| 143 | { |
|
| 144 | $headers['Proxy-Authorization'] = 'Basic ' . base64_encode($this->options['proxy.user'] . ':' . $this->options['proxy.password']); |
|
| 145 | } |
|
| 146 | } |
|
| 147 | ||
| 148 | // Build the headers string for the request. |
|