summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2008-12-12 16:07:13 (GMT)
committerDries Buytaert2008-12-12 16:07:13 (GMT)
commit2a421f116f905b0d7f4778a936f55b27dd7a817c (patch)
tree22aed6aa8bdcec8f4bd961f2113250d3f1b89c0b
parent01ed110a6bf6cd9283568e7ef8bd8f7140edd784 (diff)
- Patch #345167 by JacobSignh, pwolanin, jlkreiss, keith.smith et al: fix some new line behavior in drupal_http_request().
-rw-r--r--includes/common.inc7
1 files changed, 2 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc
index e9b3252..09432d5 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -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);