Signed-off-by: Andy Green <andy@warmcat.com>
static unsigned int opts;
static int was_closed;
static int deny_deflate;
static unsigned int opts;
static int was_closed;
static int deny_deflate;
static struct libwebsocket *wsi_mirror;
/*
static struct libwebsocket *wsi_mirror;
/*
/* because we are protocols[0] ... */
case LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED:
/* because we are protocols[0] ... */
case LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED:
- if (strcmp(in, "deflate-stream") == 0)
- if (deny_deflate) {
- fprintf(stderr, "denied deflate-stream extension\n");
- return 1;
- }
+ if ((strcmp(in, "deflate-stream") == 0) && deny_deflate) {
+ fprintf(stderr, "denied deflate-stream extension\n");
+ return 1;
+ }
+ if ((strcmp(in, "x-google-mux") == 0) && deny_mux) {
+ fprintf(stderr, "denied x-google-mux extension\n");
+ return 1;
+ }
+
{ "killmask", no_argument, NULL, 'k' },
{ "version", required_argument, NULL, 'v' },
{ "undeflated", no_argument, NULL, 'u' },
{ "killmask", no_argument, NULL, 'k' },
{ "version", required_argument, NULL, 'v' },
{ "undeflated", no_argument, NULL, 'u' },
+ { "nomux", no_argument, NULL, 'n' },
goto usage;
while (n >= 0) {
goto usage;
while (n >= 0) {
- n = getopt_long(argc, argv, "uv:khsp:", options, NULL);
+ n = getopt_long(argc, argv, "nuv:khsp:", options, NULL);
if (n < 0)
continue;
switch (n) {
if (n < 0)
continue;
switch (n) {
case 'u':
deny_deflate = 1;
break;
case 'u':
deny_deflate = 1;
break;
+ case 'n':
+ deny_mux = 1;
+ break;