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
f594b6ff
Commit
f594b6ff
authored
Aug 15, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3383 from libgit2/cmn/http-error
http: propagate the credentials callback's error code
parents
755004ea
11bca2d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
src/transports/http.c
+9
-1
No files found.
src/transports/http.c
View file @
f594b6ff
...
...
@@ -36,6 +36,8 @@ static const char *post_verb = "POST";
#define PARSE_ERROR_GENERIC -1
#define PARSE_ERROR_REPLAY -2
/** Look at the user field */
#define PARSE_ERROR_EXT -3
#define CHUNK_SIZE 4096
...
...
@@ -78,6 +80,7 @@ typedef struct {
git_vector
www_authenticate
;
enum
last_cb
last_cb
;
int
parse_error
;
int
error
;
unsigned
parse_finished
:
1
;
/* Authentication */
...
...
@@ -351,7 +354,8 @@ static int on_headers_complete(http_parser *parser)
if
(
error
==
GIT_PASSTHROUGH
)
{
no_callback
=
1
;
}
else
if
(
error
<
0
)
{
return
PARSE_ERROR_GENERIC
;
t
->
error
=
error
;
return
t
->
parse_error
=
PARSE_ERROR_EXT
;
}
else
{
assert
(
t
->
cred
);
...
...
@@ -712,6 +716,10 @@ replay:
goto
replay
;
}
if
(
t
->
parse_error
==
PARSE_ERROR_EXT
)
{
return
t
->
error
;
}
if
(
t
->
parse_error
<
0
)
return
-
1
;
...
...
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