Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
1a089351
Commit
1a089351
authored
Jun 17, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#280240
by andypost: maybe some day, someone wants to post 0. :)
parent
5077fce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
includes/common.inc
includes/common.inc
+3
-2
No files found.
includes/common.inc
View file @
1a089351
...
...
@@ -536,8 +536,9 @@ function drupal_http_request($url, array $options = array()) {
// or PUT request. Some non-standard servers get confused by Content-Length in
// at least HEAD/GET requests, and Squid always requires Content-Length in
// POST/PUT requests.
if
(
!
empty
(
$options
[
'data'
])
||
$options
[
'method'
]
==
'POST'
||
$options
[
'method'
]
==
'PUT'
)
{
$options
[
'headers'
][
'Content-Length'
]
=
strlen
(
$options
[
'data'
]);
$content_length
=
strlen
(
$options
[
'data'
]);
if
(
$content_length
>
0
||
$options
[
'method'
]
==
'POST'
||
$options
[
'method'
]
==
'PUT'
)
{
$options
[
'headers'
][
'Content-Length'
]
=
$content_length
;
}
// If the server URL has a user then attempt to use basic authentication.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment