Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
H
httprl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
drupal.org
httprl
Commits
3a8cd039
Commit
3a8cd039
authored
Jun 14, 2013
by
mikeytown2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #2020041 by mikeytown2: Fix Basic Authorization.
parent
bfa0bc5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
httprl.module
httprl.module
+3
-1
No files found.
httprl.module
View file @
3a8cd039
...
...
@@ -547,7 +547,7 @@ function httprl_set_connection_flag(&$options, $uri) {
*/
function
httprl_handle_data
(
&
$options
)
{
// Encode data if not already done.
if
(
!
empty
(
$options
[
'data'
])
&&
!
is_string
(
$options
[
'data'
]))
{
if
(
isset
(
$options
[
'data'
])
&&
!
is_string
(
$options
[
'data'
]))
{
// No files passed in, url-encode the data.
if
(
empty
(
$options
[
'data'
][
'files'
])
||
!
is_array
(
$options
[
'data'
][
'files'
]))
{
$options
[
'data'
]
=
http_build_query
(
$options
[
'data'
],
''
,
'&'
);
...
...
@@ -995,6 +995,8 @@ function httprl_request($urls, $options = array()) {
// Use a sync of async connection.
$flags
=
httprl_set_connection_flag
(
$these_options
,
$uri
);
// Set basic authorization header if needed.
httprl_basic_auth
(
$uri
,
$these_options
);
// If any data is given, do the right things to this request so it works.
httprl_handle_data
(
$these_options
);
// Build the request string.
...
...
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