Revert "Pull in latest mongoose HEAD"
This reverts commit cb2c421fdb
.
Reason: seems to be broken on W32, no response on http socket
This commit is contained in:
parent
cd0f0b9856
commit
3c73a48ce2
2 changed files with 181 additions and 406 deletions
559
3rdparty/mongoose/mongoose.c
vendored
559
3rdparty/mongoose/mongoose.c
vendored
File diff suppressed because it is too large
Load diff
28
3rdparty/mongoose/mongoose.h
vendored
28
3rdparty/mongoose/mongoose.h
vendored
|
@ -2,27 +2,28 @@
|
|||
// Copyright (c) 2013-2014 Cesanta Software Limited
|
||||
// All rights reserved
|
||||
//
|
||||
// This software is dual-licensed: you can redistribute it and/or modify
|
||||
// This library is dual-licensed: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation. For the terms of this
|
||||
// license, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// You are free to use this software under the terms of the GNU General
|
||||
// You are free to use this library under the terms of the GNU General
|
||||
// Public License, but WITHOUT ANY WARRANTY; without even the implied
|
||||
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// Alternatively, you can license this software under a commercial
|
||||
// Alternatively, you can license this library under a commercial
|
||||
// license, as set out in <http://cesanta.com/>.
|
||||
//
|
||||
// $Date: 2014-09-09 17:07:55 UTC $
|
||||
|
||||
#ifndef MONGOOSE_HEADER_INCLUDED
|
||||
#define MONGOOSE_HEADER_INCLUDED
|
||||
|
||||
#define MONGOOSE_VERSION "5.6"
|
||||
#define MONGOOSE_VERSION "5.5"
|
||||
|
||||
#include <stdio.h> // required for FILE
|
||||
#include <stddef.h> // required for size_t
|
||||
#include <sys/types.h> // required for time_t
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -52,7 +53,7 @@ struct mg_connection {
|
|||
int is_websocket; // Connection is a websocket connection
|
||||
int status_code; // HTTP status code for HTTP error handler
|
||||
int wsbits; // First byte of the websocket frame
|
||||
void *server_param; // Parameter passed to mg_create_server()
|
||||
void *server_param; // Parameter passed to mg_add_uri_handler()
|
||||
void *connection_param; // Placeholder for connection-specific data
|
||||
void *callback_param;
|
||||
};
|
||||
|
@ -60,8 +61,7 @@ struct mg_connection {
|
|||
struct mg_server; // Opaque structure describing server instance
|
||||
enum mg_result { MG_FALSE, MG_TRUE, MG_MORE };
|
||||
enum mg_event {
|
||||
MG_POLL = 100, // If callback returns MG_TRUE connection closes
|
||||
// after all of data is sent
|
||||
MG_POLL = 100, // Callback return value is ignored
|
||||
MG_CONNECT, // If callback returns MG_FALSE, connect fails
|
||||
MG_AUTH, // If callback returns MG_FALSE, authentication fails
|
||||
MG_REQUEST, // If callback returns MG_FALSE, Mongoose continues with req
|
||||
|
@ -90,7 +90,7 @@ enum {
|
|||
struct mg_server *mg_create_server(void *server_param, mg_handler_t handler);
|
||||
void mg_destroy_server(struct mg_server **);
|
||||
const char *mg_set_option(struct mg_server *, const char *opt, const char *val);
|
||||
time_t mg_poll_server(struct mg_server *, int milliseconds);
|
||||
int mg_poll_server(struct mg_server *, int milliseconds);
|
||||
const char **mg_get_valid_option_names(void);
|
||||
const char *mg_get_option(const struct mg_server *server, const char *name);
|
||||
void mg_copy_listeners(struct mg_server *from, struct mg_server *to);
|
||||
|
@ -104,10 +104,8 @@ void mg_send_status(struct mg_connection *, int status_code);
|
|||
void mg_send_header(struct mg_connection *, const char *name, const char *val);
|
||||
size_t mg_send_data(struct mg_connection *, const void *data, int data_len);
|
||||
size_t mg_printf_data(struct mg_connection *, const char *format, ...);
|
||||
size_t mg_vprintf_data(struct mg_connection *, const char *format, va_list ap);
|
||||
size_t mg_write(struct mg_connection *, const void *buf, size_t len);
|
||||
size_t mg_write(struct mg_connection *, const void *buf, int len);
|
||||
size_t mg_printf(struct mg_connection *conn, const char *fmt, ...);
|
||||
size_t mg_vprintf(struct mg_connection *conn, const char *fmt, va_list ap);
|
||||
|
||||
size_t mg_websocket_write(struct mg_connection *, int opcode,
|
||||
const char *data, size_t data_len);
|
||||
|
@ -121,8 +119,6 @@ const char *mg_get_header(const struct mg_connection *, const char *name);
|
|||
const char *mg_get_mime_type(const char *name, const char *default_mime_type);
|
||||
int mg_get_var(const struct mg_connection *conn, const char *var_name,
|
||||
char *buf, size_t buf_len);
|
||||
int mg_get_var_n(const struct mg_connection *conn, const char *var_name,
|
||||
char *buf, size_t buf_len, int n);
|
||||
int mg_parse_header(const char *hdr, const char *var_name, char *buf, size_t);
|
||||
int mg_parse_multipart(const char *buf, int buf_len,
|
||||
char *var_name, int var_name_len,
|
||||
|
@ -134,8 +130,8 @@ int mg_parse_multipart(const char *buf, int buf_len,
|
|||
void *mg_start_thread(void *(*func)(void *), void *param);
|
||||
char *mg_md5(char buf[33], ...);
|
||||
int mg_authorize_digest(struct mg_connection *c, FILE *fp);
|
||||
size_t mg_url_encode(const char *src, size_t s_len, char *dst, size_t dst_len);
|
||||
int mg_url_decode(const char *src, size_t src_len, char *dst, size_t dst_len, int);
|
||||
int mg_url_encode(const char *src, size_t s_len, char *dst, size_t dst_len);
|
||||
int mg_url_decode(const char *src, int src_len, char *dst, int dst_len, int);
|
||||
int mg_terminate_ssl(struct mg_connection *c, const char *cert);
|
||||
int mg_forward(struct mg_connection *c, const char *addr);
|
||||
void *mg_mmap(FILE *fp, size_t size);
|
||||
|
|
Loading…
Reference in a new issue