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
66d90e70
Commit
66d90e70
authored
Sep 10, 2015
by
Matt Burke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More specific names
parent
8c876fa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/transports/smart.c
+4
-4
No files found.
src/transports/smart.c
View file @
66d90e70
...
@@ -66,7 +66,7 @@ static int git_smart__set_callbacks(
...
@@ -66,7 +66,7 @@ static int git_smart__set_callbacks(
return
0
;
return
0
;
}
}
bool
is_valid
(
const
char
*
custom_header
)
bool
is_valid
_custom_header
(
const
char
*
custom_header
)
{
{
const
char
*
c
;
const
char
*
c
;
int
name_len
;
int
name_len
;
...
@@ -99,7 +99,7 @@ bool is_valid(const char *custom_header)
...
@@ -99,7 +99,7 @@ bool is_valid(const char *custom_header)
git__strncmp
(
"Content-Length"
,
custom_header
,
name_len
)
==
0
;
git__strncmp
(
"Content-Length"
,
custom_header
,
name_len
)
==
0
;
}
}
const
char
*
find_invalid_header
(
const
git_strarray
*
custom_headers
)
const
char
*
find_invalid_
custom_
header
(
const
git_strarray
*
custom_headers
)
{
{
size_t
i
;
size_t
i
;
...
@@ -107,7 +107,7 @@ const char *find_invalid_header(const git_strarray *custom_headers)
...
@@ -107,7 +107,7 @@ const char *find_invalid_header(const git_strarray *custom_headers)
return
NULL
;
return
NULL
;
for
(
i
=
0
;
i
<
custom_headers
->
count
;
i
++
)
for
(
i
=
0
;
i
<
custom_headers
->
count
;
i
++
)
if
(
!
is_valid
(
custom_headers
->
strings
[
i
]))
if
(
!
is_valid
_custom_header
(
custom_headers
->
strings
[
i
]))
return
custom_headers
->
strings
[
i
];
return
custom_headers
->
strings
[
i
];
return
NULL
;
return
NULL
;
...
@@ -118,7 +118,7 @@ static int git_smart__set_custom_headers(
...
@@ -118,7 +118,7 @@ static int git_smart__set_custom_headers(
const
git_strarray
*
custom_headers
)
const
git_strarray
*
custom_headers
)
{
{
transport_smart
*
t
=
(
transport_smart
*
)
transport
;
transport_smart
*
t
=
(
transport_smart
*
)
transport
;
const
char
*
invalid_header
=
find_invalid_header
(
custom_headers
);
const
char
*
invalid_header
=
find_invalid_
custom_
header
(
custom_headers
);
if
(
invalid_header
!=
NULL
)
{
if
(
invalid_header
!=
NULL
)
{
giterr_set
(
GITERR_INVALID
,
"Illegal HTTP header '%s'"
,
invalid_header
);
giterr_set
(
GITERR_INVALID
,
"Illegal HTTP header '%s'"
,
invalid_header
);
...
...
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