Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
35d86c77
Commit
35d86c77
authored
Jan 14, 2019
by
Jason Haslam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy: fix crash on remote connection with GIT_PROXY_AUTO but no proxy is detected
parent
1305cd4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
src/transports/http.c
+3
-0
tests/online/clone.c
+7
-0
No files found.
src/transports/http.c
View file @
35d86c77
...
@@ -679,6 +679,9 @@ static int load_proxy_config(http_subtransport *t)
...
@@ -679,6 +679,9 @@ static int load_proxy_config(http_subtransport *t)
!!
t
->
server
.
url
.
use_ssl
,
&
t
->
proxy_url
))
<
0
)
!!
t
->
server
.
url
.
use_ssl
,
&
t
->
proxy_url
))
<
0
)
return
error
;
return
error
;
if
(
!
t
->
proxy_url
)
return
0
;
t
->
proxy_opts
.
type
=
GIT_PROXY_SPECIFIED
;
t
->
proxy_opts
.
type
=
GIT_PROXY_SPECIFIED
;
t
->
proxy_opts
.
url
=
t
->
proxy_url
;
t
->
proxy_opts
.
url
=
t
->
proxy_url
;
t
->
proxy_opts
.
credentials
=
t
->
owner
->
proxy
.
credentials
;
t
->
proxy_opts
.
credentials
=
t
->
owner
->
proxy
.
credentials
;
...
...
tests/online/clone.c
View file @
35d86c77
...
@@ -840,3 +840,10 @@ void test_online_clone__proxy_credentials_in_environment(void)
...
@@ -840,3 +840,10 @@ void test_online_clone__proxy_credentials_in_environment(void)
git_buf_dispose
(
&
url
);
git_buf_dispose
(
&
url
);
}
}
void
test_online_clone__proxy_auto_not_detected
(
void
)
{
g_options
.
fetch_opts
.
proxy_opts
.
type
=
GIT_PROXY_AUTO
;
cl_git_pass
(
git_clone
(
&
g_repo
,
"http://github.com/libgit2/TestGitRepository"
,
"./foo"
,
&
g_options
));
}
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