Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
309
Merge Requests
309
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
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