Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
eed1f2e5
Commit
eed1f2e5
authored
Jul 13, 2012
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
33a16826
' into develop
parents
b33c09bf
33a16826
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
library/Solarium/Client/Adapter/Curl.php
library/Solarium/Client/Adapter/Curl.php
+5
-0
library/Solarium/Client/Adapter/Http.php
library/Solarium/Client/Adapter/Http.php
+6
-0
No files found.
library/Solarium/Client/Adapter/Curl.php
View file @
eed1f2e5
...
...
@@ -138,6 +138,11 @@ class Solarium_Client_Adapter_Curl extends Solarium_Client_Adapter
$options
[
'headers'
][
'Content-Type'
]
=
'text/xml; charset=utf-8'
;
}
if
(
isset
(
$this
->
_options
[
'username'
])
&&
isset
(
$this
->
_options
[
'password'
]))
{
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$this
->
_options
[
'username'
]
.
':'
.
$this
->
_options
[
'password'
]
);
curl_setopt
(
$handler
,
CURLOPT_HTTPAUTH
,
CURLAUTH_BASIC
);
}
if
(
count
(
$options
[
'headers'
]))
{
$headers
=
array
();
foreach
(
$options
[
'headers'
]
as
$key
=>
$value
)
{
...
...
library/Solarium/Client/Adapter/Http.php
View file @
eed1f2e5
...
...
@@ -121,6 +121,12 @@ class Solarium_Client_Adapter_Http extends Solarium_Client_Adapter
);
}
if
(
isset
(
$this
->
_options
[
'username'
])
&&
isset
(
$this
->
_options
[
'password'
]))
{
$request
->
addHeader
(
'Authorization: Basic '
.
base64_encode
(
$this
->
_options
[
'username'
]
.
':'
.
$this
->
_options
[
'password'
]
));
}
return
$context
;
}
...
...
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