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
a3e2a418
Commit
a3e2a418
authored
8 years ago
by
Marko Mikulicic
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error reporting of mg_connect_http
PUBLISHED_FROM=8149fc5ab3c6f7d6ec360473f0e6847040ca820b
parent
b667bd70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
mongoose.c
mongoose.c
+4
-0
No files found.
mongoose.c
View file @
a3e2a418
...
...
@@ -5853,8 +5853,10 @@ void mg_http_reverse_proxy(struct mg_connection *nc,
char
*
addr
=
NULL
;
const
char
*
path
=
NULL
;
int
i
;
const
char
*
error
;
struct
mg_connect_opts
opts
;
memset
(
&
opts
,
0
,
sizeof
(
opts
));
opts
.
error_string
=
&
error
;
mg_asprintf
(
&
purl
,
sizeof
(
burl
),
"%.*s%.*s"
,
(
int
)
upstream
.
len
,
upstream
.
p
,
(
int
)
(
hm
->
uri
.
len
-
mount
.
len
),
hm
->
uri
.
p
+
mount
.
len
);
...
...
@@ -5865,6 +5867,7 @@ void mg_http_reverse_proxy(struct mg_connection *nc,
(
int
)
mount
.
len
,
mount
.
p
));
if
(
be
==
NULL
)
{
LOG
(
LL_ERROR
,
(
"Error connecting to %s: %s"
,
purl
,
error
));
mg_http_send_error
(
nc
,
502
,
NULL
);
goto
cleanup
;
}
...
...
@@ -6394,6 +6397,7 @@ struct mg_connection *mg_connect_http_base(
if
(
mg_http_common_url_parse
(
url
,
schema
,
schema_ssl
,
&
use_ssl
,
addr
,
&
port_i
,
path
)
<
0
)
{
MG_SET_PTRPTR
(
opts
.
error_string
,
"cannot parse url"
);
return
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
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