Commit 2a421f11 authored by Dries's avatar Dries

- Patch #345167 by JacobSignh, pwolanin, jlkreiss, keith.smith et al: fix some...

- Patch #345167 by JacobSignh, pwolanin, jlkreiss, keith.smith et al: fix some new line behavior in drupal_http_request().
parent 01ed110a
......@@ -531,15 +531,12 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
}
foreach ($headers as $header => $value) {
$defaults[$header] = $header . ': ' . $value;
$defaults[$header] = $header . ': ' . trim($value);
}
$request = $method . ' ' . $path . " HTTP/1.0\r\n";
$request .= implode("\r\n", $defaults);
$request .= "\r\n\r\n";
if ($data) {
$request .= $data . "\r\n";
}
$request .= "\r\n\r\n" . $data;
$result->request = $request;
fwrite($fp, $request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment