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