Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b9f2b7e2
Commit
b9f2b7e2
authored
Dec 11, 2005
by
Dries Buytaert
Browse files
- Patch
#40706
by chx: fixed warnings.
parent
0eb731d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
b9f2b7e2
...
...
@@ -332,12 +332,12 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
$uri
=
parse_url
(
$url
);
switch
(
$uri
[
'scheme'
])
{
case
'http'
:
$port
=
$uri
[
'port'
]
?
$uri
[
'port'
]
:
80
;
$port
=
isset
(
$uri
[
'port'
]
)
?
$uri
[
'port'
]
:
80
;
$fp
=
@
fsockopen
(
$uri
[
'host'
],
$port
,
$errno
,
$errstr
,
15
);
break
;
case
'https'
:
// Note: Only works for PHP 4.3 compiled with OpenSSL.
$port
=
$uri
[
'port'
]
?
$uri
[
'port'
]
:
443
;
$port
=
isset
(
$uri
[
'port'
]
)
?
$uri
[
'port'
]
:
443
;
$fp
=
@
fsockopen
(
'ssl://'
.
$uri
[
'host'
],
$port
,
$errno
,
$errstr
,
20
);
break
;
default
:
...
...
@@ -352,8 +352,8 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
}
// Construct the path to act on.
$path
=
$uri
[
'path'
]
?
$uri
[
'path'
]
:
'/'
;
if
(
$uri
[
'query'
])
{
$path
=
isset
(
$uri
[
'path'
]
)
?
$uri
[
'path'
]
:
'/'
;
if
(
isset
(
$uri
[
'query'
])
)
{
$path
.
=
'?'
.
$uri
[
'query'
];
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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