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
7e68b097
Commit
7e68b097
authored
9 years ago
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close
https://github.com/cesanta/mongoose/pull/603
PUBLISHED_FROM=ab934b21ed67878f47ccd569d88030e53e914bf7
parent
4d41dff4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
load_balancer.c
examples/load_balancer/load_balancer.c
+10
-2
No files found.
examples/load_balancer/load_balancer.c
View file @
7e68b097
...
...
@@ -233,6 +233,12 @@ static void forward(struct conn_data *conn, struct http_message *hm,
/* We always rewrite the connection header depending on the settings. */
if
(
mg_vcasecmp
(
&
hn
,
"Connection"
)
==
0
)
continue
;
/* Don't pass chunked transfer encoding to the client */
if
(
mg_vcasecmp
(
&
hn
,
"Transfer-encoding"
)
==
0
&&
mg_vcasecmp
(
&
hv
,
"chunked"
)
==
0
)
{
continue
;
}
mg_printf
(
dst
,
"%.*s: %.*s
\r\n
"
,
(
int
)
hn
.
len
,
hn
.
p
,
(
int
)
hv
.
len
,
hv
.
p
);
}
...
...
@@ -272,7 +278,7 @@ static int connect_backend(struct conn_data *conn, struct http_message *hm) {
struct
http_backend
*
be
=
choose_backend
(
hm
);
write_log
(
"%.*s %.*s backend=%s
\n
"
,
(
int
)
hm
->
method
.
len
,
hm
->
method
.
p
,
(
int
)
hm
->
uri
.
len
,
hm
->
uri
.
p
,
be
->
host_port
);
(
int
)
hm
->
uri
.
len
,
hm
->
uri
.
p
,
be
?
be
->
host_port
:
"not defined"
);
if
(
be
==
NULL
)
return
0
;
if
(
be
->
redirect
!=
0
)
{
...
...
@@ -413,7 +419,9 @@ static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
}
return
;
}
else
{
nc
->
flags
|=
MG_F_CLOSE_IMMEDIATELY
;
if
(
ev
!=
MG_EV_POLL
)
{
nc
->
flags
|=
MG_F_CLOSE_IMMEDIATELY
;
}
return
;
}
}
...
...
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