mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00

Actually lwsws doesn't need his own protocol handler even for http any more. The default http handler in lws should do everything. Move the cgi routing into lws default http protocol handler, and delete lwsws one. Remove all protocols from lwsws so the lws default one gets used. With this, and the earlier move of lejp into lws, lwsws itself becomes 15.5KB of x86_64 (mainly conf parsing). Signed-off-by: Andy Green <andy@warmcat.com>
45 lines
959 B
C
45 lines
959 B
C
#if defined(_WIN32) && defined(EXTERNAL_POLL)
|
|
#define WINVER 0x0600
|
|
#define _WIN32_WINNT 0x0600
|
|
#define poll(fdArray, fds, timeout) WSAPoll((LPWSAPOLLFD)(fdArray), (ULONG)(fds), (INT)(timeout))
|
|
#endif
|
|
|
|
#include "lws_config.h"
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <getopt.h>
|
|
#include <signal.h>
|
|
#include <string.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <assert.h>
|
|
#ifndef _WIN32
|
|
#include <dirent.h>
|
|
#endif
|
|
|
|
#include "../lib/libwebsockets.h"
|
|
#include "lejp.h"
|
|
|
|
#ifdef _WIN32
|
|
#include <io.h>
|
|
#include "gettimeofday.h"
|
|
#else
|
|
#include <syslog.h>
|
|
#include <sys/time.h>
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
|
|
#ifndef __func__
|
|
#define __func__ __FUNCTION__
|
|
#endif
|
|
|
|
extern int
|
|
lwsws_get_config_globals(struct lws_context_creation_info *info, const char *d,
|
|
char **config_strings, int *len);
|
|
|
|
extern int
|
|
lwsws_get_config_vhosts(struct lws_context *context,
|
|
struct lws_context_creation_info *info, const char *d,
|
|
char **config_strings, int *len);
|