diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-12 16:07:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-12 16:07:13 +0000 |
commit | 2a421f116f905b0d7f4778a936f55b27dd7a817c (patch) | |
tree | 22aed6aa8bdcec8f4bd961f2113250d3f1b89c0b /includes | |
parent | 01ed110a6bf6cd9283568e7ef8bd8f7140edd784 (diff) | |
download | brdo-2a421f116f905b0d7f4778a936f55b27dd7a817c.tar.gz brdo-2a421f116f905b0d7f4778a936f55b27dd7a817c.tar.bz2 |
- Patch #345167 by JacobSignh, pwolanin, jlkreiss, keith.smith et al: fix some new line behavior in drupal_http_request().
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc index e9b325288..09432d55e 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); |