|  | @@ -1,14 +1,9 @@
 | 
											
												
													
														|  | -/*
 |  | 
 | 
											
												
													
														|  | - * 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 <stdio.h>
 | 
											
												
													
														|  |  #include <stdlib.h>
 |  |  #include <stdlib.h>
 | 
											
										
											
												
													
														|  | @@ -324,7 +319,7 @@ static void redirect_to_ssl(struct mg_connection *conn,
 | 
											
												
													
														|  |    if (host != NULL && (p = strchr(host, ':')) != NULL) {
 |  |    if (host != NULL && (p = strchr(host, ':')) != NULL) {
 | 
											
												
													
														|  |      mg_printf(conn, "HTTP/1.1 302 Found\r\n"
 |  |      mg_printf(conn, "HTTP/1.1 302 Found\r\n"
 | 
											
												
													
														|  |                "Location: https://%.*s:8082/%s:8082\r\n\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 {
 |  |    } else {
 | 
											
												
													
														|  |      mg_printf(conn, "%s", "HTTP/1.1 500 Error\r\n\r\nHost: header is not set");
 |  |      mg_printf(conn, "%s", "HTTP/1.1 500 Error\r\n\r\nHost: header is not set");
 | 
											
												
													
														|  |    }
 |  |    }
 |