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
e0b9e4ab
Commit
e0b9e4ab
authored
Jun 16, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added enable_proxy
parent
665f2055
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mongoose.c
mongoose.c
+6
-2
No files found.
mongoose.c
View file @
e0b9e4ab
...
@@ -1196,6 +1196,7 @@ enum {
...
@@ -1196,6 +1196,7 @@ enum {
#ifndef MONGOOSE_NO_DIRECTORY_LISTING
#ifndef MONGOOSE_NO_DIRECTORY_LISTING
ENABLE_DIRECTORY_LISTING
,
ENABLE_DIRECTORY_LISTING
,
#endif
#endif
ENABLE_PROXY
,
#endif
#endif
EXTRA_MIME_TYPES
,
EXTRA_MIME_TYPES
,
#if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_AUTH)
#if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_AUTH)
...
@@ -1238,6 +1239,7 @@ static const char *static_config_options[] = {
...
@@ -1238,6 +1239,7 @@ static const char *static_config_options[] = {
#ifndef MONGOOSE_NO_DIRECTORY_LISTING
#ifndef MONGOOSE_NO_DIRECTORY_LISTING
"enable_directory_listing"
,
"yes"
,
"enable_directory_listing"
,
"yes"
,
#endif
#endif
"enable_proxy"
,
NULL
,
#endif
#endif
"extra_mime_types"
,
NULL
,
"extra_mime_types"
,
NULL
,
#if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_AUTH)
#if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_AUTH)
...
@@ -4198,6 +4200,7 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
...
@@ -4198,6 +4200,7 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
file_stat_t
st
;
file_stat_t
st
;
int
exists
=
0
;
int
exists
=
0
;
#endif
#endif
const
char
*
pxy
=
conn
->
server
->
config_options
[
ENABLE_PROXY
];
// If EP_USER was set in a prev call, reset it
// If EP_USER was set in a prev call, reset it
conn
->
endpoint_type
=
EP_NONE
;
conn
->
endpoint_type
=
EP_NONE
;
...
@@ -4226,8 +4229,9 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
...
@@ -4226,8 +4229,9 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
return
;
return
;
}
}
if
(
strcmp
(
conn
->
mg_conn
.
request_method
,
"CONNECT"
)
==
0
||
if
(
pxy
!=
NULL
&&
!
strcmp
(
pxy
,
"yes"
)
&&
memcmp
(
conn
->
mg_conn
.
uri
,
"http"
,
4
)
==
0
)
{
(
strcmp
(
conn
->
mg_conn
.
request_method
,
"CONNECT"
)
==
0
||
memcmp
(
conn
->
mg_conn
.
uri
,
"http"
,
4
)
==
0
))
{
proxify_connection
(
conn
);
proxify_connection
(
conn
);
return
;
return
;
}
}
...
...
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