equal
deleted
inserted
replaced
148 } |
148 } |
149 |
149 |
150 $options['hooks']->dispatch('fsockopen.remote_host_path', array(&$path, $url)); |
150 $options['hooks']->dispatch('fsockopen.remote_host_path', array(&$path, $url)); |
151 |
151 |
152 $request_body = ''; |
152 $request_body = ''; |
153 $out = sprintf("%s %s HTTP/%.1f\r\n", $options['type'], $path, $options['protocol_version']); |
153 $out = sprintf("%s %s HTTP/%.1F\r\n", $options['type'], $path, $options['protocol_version']); |
154 |
154 |
155 if ($options['type'] !== Requests::TRACE) { |
155 if ($options['type'] !== Requests::TRACE) { |
156 if (is_array($data)) { |
156 if (is_array($data)) { |
157 $request_body = http_build_query($data, null, '&'); |
157 $request_body = http_build_query($data, null, '&'); |
158 } |
158 } |
190 } |
190 } |
191 |
191 |
192 $headers = Requests::flatten($headers); |
192 $headers = Requests::flatten($headers); |
193 |
193 |
194 if (!empty($headers)) { |
194 if (!empty($headers)) { |
195 $out .= implode($headers, "\r\n") . "\r\n"; |
195 $out .= implode("\r\n", $headers) . "\r\n"; |
196 } |
196 } |
197 |
197 |
198 $options['hooks']->dispatch('fsockopen.after_headers', array(&$out)); |
198 $options['hooks']->dispatch('fsockopen.after_headers', array(&$out)); |
199 |
199 |
200 if (substr($out, -2) !== "\r\n") { |
200 if (substr($out, -2) !== "\r\n") { |