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
56c1cda2
Commit
56c1cda2
authored
Nov 01, 2013
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify parsing issues and errors
parent
7e035908
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/netops.c
+3
-2
No files found.
src/netops.c
View file @
56c1cda2
...
@@ -674,7 +674,8 @@ int gitno_extract_url_parts(
...
@@ -674,7 +674,8 @@ int gitno_extract_url_parts(
* ==> [user[:pass]@]hostname.tld[:port]/resource
* ==> [user[:pass]@]hostname.tld[:port]/resource
*/
*/
/* Check for user and maybe password */
/* Check for user and maybe password. Note that this deviates from RFC-1738
* in that it allows non-encoded colons in the password field. */
at
=
strchr
(
url
,
'@'
);
at
=
strchr
(
url
,
'@'
);
if
(
at
)
{
if
(
at
)
{
colon
=
strchr
(
url
,
':'
);
colon
=
strchr
(
url
,
':'
);
...
@@ -695,7 +696,7 @@ int gitno_extract_url_parts(
...
@@ -695,7 +696,7 @@ int gitno_extract_url_parts(
colon
=
strchr
(
url
,
':'
);
colon
=
strchr
(
url
,
':'
);
if
(
!
slash
||
if
(
!
slash
||
(
colon
&&
(
slash
<
colon
)))
{
(
colon
&&
(
slash
<
colon
)))
{
giterr_set
(
GITERR_NET
,
"Malformed URL
"
);
giterr_set
(
GITERR_NET
,
"Malformed URL
: %s"
,
url
);
return
GIT_EINVALIDSPEC
;
return
GIT_EINVALIDSPEC
;
}
}
...
...
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