Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
81f738af
Commit
81f738af
authored
Nov 17, 2016
by
Alexander Alashkin
Committed by
Cesanta Bot
Nov 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mg_http_common_url_parse
PUBLISHED_FROM=51c44c445309aa0850b227949a0a0a6be433d08c
parent
f6165d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
mongoose.c
mongoose.c
+7
-6
No files found.
mongoose.c
View file @
81f738af
...
...
@@ -7295,6 +7295,7 @@ MG_INTERNAL int mg_http_common_url_parse(const char *url, const char *schema,
int
addr_len
=
0
;
int
auth_sep_pos
=
-
1
;
int
user_sep_pos
=
-
1
;
int
port_pos
=
-
1
;
(
void
)
user
;
(
void
)
pass
;
...
...
@@ -7319,19 +7320,19 @@ MG_INTERNAL int mg_http_common_url_parse(const char *url, const char *schema,
}
if
(
*
url
==
'@'
)
{
auth_sep_pos
=
addr_len
;
user_sep_pos
=
*
port_i
;
*
port_i
=
-
1
;
user_sep_pos
=
port_pos
;
port_pos
=
-
1
;
}
if
(
*
url
==
':'
)
*
port_i
=
addr_len
;
if
(
*
url
==
':'
)
port_pos
=
addr_len
;
(
*
addr
)[
addr_len
++
]
=
*
url
;
(
*
addr
)[
addr_len
]
=
'\0'
;
url
++
;
}
if
(
addr_len
==
0
)
goto
cleanup
;
if
(
*
port_i
<
0
)
{
*
port_i
=
addr_len
;
strcpy
(
*
addr
+
*
port_i
,
*
use_ssl
?
":443"
:
":80"
);
if
(
port_pos
<
0
)
{
*
port_i
=
*
use_ssl
?
443
:
80
;
addr_len
+=
sprintf
(
*
addr
+
addr_len
,
":%d"
,
*
port_i
);
}
else
{
*
port_i
=
-
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