Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
filefield_sources
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
filefield_sources
Commits
726b4b33
Commit
726b4b33
authored
11 years ago
by
Nate Lampton
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1795160
by elplatt and Demonick99: An HTTP error 0 occurred when transferring remote files.
parent
0979e04c
Branches
6.x-1.x
Tags
6.x-1.10
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sources/remote.inc
+1
-1
1 addition, 1 deletion
sources/remote.inc
with
1 addition
and
1 deletion
sources/remote.inc
+
1
−
1
View file @
726b4b33
...
...
@@ -131,6 +131,7 @@ function filefield_source_remote_value($element, &$item) {
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
TRUE
);
curl_setopt
(
$ch
,
CURLOPT_NOBODY
,
TRUE
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
TRUE
);
curl_setopt
(
$ch
,
CURLOPT_HEADERFUNCTION
,
'_filefield_source_remote_parse_header'
);
// Causes a warning if PHP safe mode is on.
@
curl_setopt
(
$ch
,
CURLOPT_FOLLOWLOCATION
,
TRUE
);
...
...
@@ -138,7 +139,6 @@ function filefield_source_remote_value($element, &$item) {
$info
=
curl_getinfo
(
$ch
);
if
(
$info
[
'http_code'
]
!=
200
)
{
curl_setopt
(
$ch
,
CURLOPT_HTTPGET
,
TRUE
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
TRUE
);
$file_contents
=
curl_exec
(
$ch
);
$info
=
curl_getinfo
(
$ch
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment