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
0ede6a35
Commit
0ede6a35
authored
Jun 06, 2012
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Squashed build warning
parent
4566ca56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
chat.c
examples/chat.c
+7
-12
No files found.
examples/chat.c
View file @
0ede6a35
/*
* This file is part of the Mongoose project, http://code.google.com/p/mongoose
* It implements an online chat server. For more details,
* see the documentation on the project web site.
* To test the application,
* 1. type "make" in the directory where this file lives
* 2. point your browser to http://127.0.0.1:8081
*
* NOTE(lsm): this file follows Google style, not BSD style as the rest of
* Mongoose code.
*/
// This file is part of the Mongoose project, http://code.google.com/p/mongoose
// It implements an online chat server. For more details,
// see the documentation on the project web site.
// To test the application,
// 1. type "make" in the directory where this file lives
// 2. point your browser to http://127.0.0.1:8081
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -324,7 +319,7 @@ static void redirect_to_ssl(struct mg_connection *conn,
if
(
host
!=
NULL
&&
(
p
=
strchr
(
host
,
':'
))
!=
NULL
)
{
mg_printf
(
conn
,
"HTTP/1.1 302 Found
\r\n
"
"Location: https://%.*s:8082/%s:8082
\r\n\r\n
"
,
p
-
host
,
host
,
request_info
->
uri
);
(
int
)
(
p
-
host
)
,
host
,
request_info
->
uri
);
}
else
{
mg_printf
(
conn
,
"%s"
,
"HTTP/1.1 500 Error
\r\n\r\n
Host: header is not set"
);
}
...
...
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