Skip to contentSkip to conversation

libmicrohttpd: fix CVE-2025-59777, CVE-2025-62689

PATCH New [email protected] 1 participant 1 message Nov 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmicrohttpd: fix CVE-2025-59777, CVE-2025-62689

From: Changqing Li <[email protected]>

Refer:
https://nvd.nist.gov/vuln/detail/CVE-2025-59777
https://nvd.nist.gov/vuln/detail/CVE-2025-62689

---
 ...0001-Remove-broken-experimental-code.patch | 14472 ++++++++++++++++
 .../libmicrohttpd/libmicrohttpd_1.0.2.bb      |     3 +-
 2 files changed, 14474 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libmicrohttpd/files/0001-Remove-broken-experimental-code.patch
meta/recipes-support/libmicrohttpd/files/0001-Remove-broken-experimental-code.patch new file +14472 -0
new file mode 100644
index 0000000000..c4b00ec6f4
@@ -0,0 +1,14472 @@
+From 3f5e5ad634d605373e3cd34ddea4cb6af27b4f43 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Thu, 13 Nov 2025 13:42:41 +0800
+Subject: [PATCH] Remove broken experimental code
+
+Upstream-Status: Backport [https://git.gnunet.org/libmicrohttpd.git/commit/?id=ff13abc1c1d7d2b30d69d5c0bd4a237e1801c50b
+https://git.gnunet.org/libmicrohttpd.git/commit/?id=ba8f88fcb47cfb0de5237d47f9487cd1f350cbe9]
+
+CVE: CVE-2025-59777,CVE-2025-62689
+
+Signed-off-by: Changqing Li <[email protected]>
+---
+ configure.ac                       |     1 -
+ src/Makefile.am                    |     5 -
+ src/microhttpd_ws/Makefile.am      |    43 -
+ src/microhttpd_ws/Makefile.in      |  1298 ----
+ src/microhttpd_ws/mhd_websocket.c  |  2443 -------
+ src/microhttpd_ws/sha1.c           |   378 -
+ src/microhttpd_ws/sha1.h           |   110 -
+ src/microhttpd_ws/test_websocket.c | 10105 ---------------------------
+ 8 files changed, 14383 deletions(-)
+ delete mode 100644 src/microhttpd_ws/Makefile.am
+ delete mode 100644 src/microhttpd_ws/Makefile.in
+ delete mode 100644 src/microhttpd_ws/mhd_websocket.c
+ delete mode 100644 src/microhttpd_ws/sha1.c
+ delete mode 100644 src/microhttpd_ws/sha1.h
+ delete mode 100644 src/microhttpd_ws/test_websocket.c
+
+diff --git a/configure.ac b/configure.ac
+index 17dc192..50fbf54 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5929,7 +5929,6 @@ m4/Makefile
+ src/Makefile
+ src/include/Makefile
+ src/microhttpd/Makefile
+-src/microhttpd_ws/Makefile
+ src/examples/Makefile
+ src/tools/Makefile
+ src/testcurl/Makefile
+diff --git a/src/Makefile.am b/src/Makefile.am
+index d02ab8f..07d8f3d 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -9,11 +9,6 @@ SUBDIRS += testzzuf
+ endif
+ endif
+ 
+-# Finally (last!) also build experimental lib...
+-if HAVE_EXPERIMENTAL
+-SUBDIRS += microhttpd_ws
+-endif
+-
+ if BUILD_EXAMPLES
+ SUBDIRS += examples
+ endif
+diff --git a/src/microhttpd_ws/Makefile.am b/src/microhttpd_ws/Makefile.am
+deleted file mode 100644
+index 3ce8a9f..0000000
+--- a/src/microhttpd_ws/Makefile.am
++++ /dev/null
+@@ -1,43 +0,0 @@
+-# This Makefile.am is in the public domain
+-AM_CPPFLAGS = \
+-  -I$(top_srcdir)/src/include \
+-  -I$(top_srcdir)/src/microhttpd
+-
+-AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS)
+-
+-$(top_builddir)/src/microhttpd/libmicrohttpd.la: $(top_builddir)/src/microhttpd/Makefile
+-	@echo ' cd $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la'; \
+-	$(am__cd) $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la
+-
+-noinst_DATA =
+-MOSTLYCLEANFILES =
+-
+-SUBDIRS = .
+-
+-lib_LTLIBRARIES = \
+-  libmicrohttpd_ws.la
+-libmicrohttpd_ws_la_SOURCES = \
+-  sha1.c sha1.h \
+-  mhd_websocket.c
+-libmicrohttpd_ws_la_CPPFLAGS = \
+-  $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \
+-  -DBUILDING_MHD_LIB=1
+-libmicrohttpd_ws_la_CFLAGS = \
+-  $(AM_CFLAGS) $(MHD_LIB_CFLAGS)
+-libmicrohttpd_ws_la_LDFLAGS = \
+-  $(MHD_LIB_LDFLAGS) \
+-  $(W32_MHD_LIB_LDFLAGS) \
+-  -version-info 0:0:0
+-libmicrohttpd_ws_la_LIBADD = \
+-  $(MHD_LIBDEPS)
+-
+-TESTS = $(check_PROGRAMS)
+-
+-check_PROGRAMS = \
+-  test_websocket
+-
+-test_websocket_SOURCES = \
+-  test_websocket.c
+-test_websocket_LDADD = \
+-  $(top_builddir)/src/microhttpd_ws/libmicrohttpd_ws.la \
+-  $(top_builddir)/src/microhttpd/libmicrohttpd.la
+diff --git a/src/microhttpd_ws/Makefile.in b/src/microhttpd_ws/Makefile.in
+deleted file mode 100644
+index 43571e7..0000000
+--- a/src/microhttpd_ws/Makefile.in
++++ /dev/null
+@@ -1,1298 +0,0 @@
+-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+-# @configure_input@
+-
+-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+-
+-# This Makefile.in is free software; the Free Software Foundation
+-# gives unlimited permission to copy and/or distribute it,
+-# with or without modifications, as long as this notice is preserved.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+-# PARTICULAR PURPOSE.
+-
+-@SET_MAKE@
+-
+-
+-VPATH = @srcdir@
+-am__is_gnu_make = { \
+-  if test -z '$(MAKELEVEL)'; then \
+-    false; \
+-  elif test -n '$(MAKE_HOST)'; then \
+-    true; \
+-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+-    true; \
+-  else \
+-    false; \
+-  fi; \
+-}
+-am__make_running_with_option = \
+-  case $${target_option-} in \
+-      ?) ;; \
+-      *) echo "am__make_running_with_option: internal error: invalid" \
+-              "target option '$${target_option-}' specified" >&2; \
+-         exit 1;; \
+-  esac; \
+-  has_opt=no; \
+-  sane_makeflags=$$MAKEFLAGS; \
+-  if $(am__is_gnu_make); then \
+-    sane_makeflags=$$MFLAGS; \
+-  else \
+-    case $$MAKEFLAGS in \
+-      *\\[\ \	]*) \
+-        bs=\\; \
+-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+-    esac; \
+-  fi; \
+-  skip_next=no; \
+-  strip_trailopt () \
+-  { \
+-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+-  }; \
+-  for flg in $$sane_makeflags; do \
+-    test $$skip_next = yes && { skip_next=no; continue; }; \
+-    case $$flg in \
+-      *=*|--*) continue;; \
+-        -*I) strip_trailopt 'I'; skip_next=yes;; \
+-      -*I?*) strip_trailopt 'I';; \
+-        -*O) strip_trailopt 'O'; skip_next=yes;; \
+-      -*O?*) strip_trailopt 'O';; \
+-        -*l) strip_trailopt 'l'; skip_next=yes;; \
+-      -*l?*) strip_trailopt 'l';; \
+-      -[dEDm]) skip_next=yes;; \
+-      -[JT]) skip_next=yes;; \
+-    esac; \
+-    case $$flg in \
+-      *$$target_option*) has_opt=yes; break;; \
+-    esac; \
+-  done; \
+-  test $$has_opt = yes
+-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+-pkgdatadir = $(datadir)/@PACKAGE@
+-pkgincludedir = $(includedir)/@PACKAGE@
+-pkglibdir = $(libdir)/@PACKAGE@
+-pkglibexecdir = $(libexecdir)/@PACKAGE@
+-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-install_sh_DATA = $(install_sh) -c -m 644
+-install_sh_PROGRAM = $(install_sh) -c
+-install_sh_SCRIPT = $(install_sh) -c
+-INSTALL_HEADER = $(INSTALL_DATA)
+-transform = $(program_transform_name)
+-NORMAL_INSTALL = :
+-PRE_INSTALL = :
+-POST_INSTALL = :
+-NORMAL_UNINSTALL = :
+-PRE_UNINSTALL = :
+-POST_UNINSTALL = :
+-build_triplet = @build@
+-host_triplet = @host@
+-check_PROGRAMS = test_websocket$(EXEEXT)
+-subdir = src/microhttpd_ws
+-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+-	$(top_srcdir)/m4/ax_append_compile_flags.m4 \
+-	$(top_srcdir)/m4/ax_append_flag.m4 \
+-	$(top_srcdir)/m4/ax_append_link_flags.m4 \
+-	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
+-	$(top_srcdir)/m4/ax_check_link_flag.m4 \
+-	$(top_srcdir)/m4/ax_count_cpus.m4 \
+-	$(top_srcdir)/m4/ax_pthread.m4 \
+-	$(top_srcdir)/m4/ax_require_defined.m4 \
+-	$(top_srcdir)/m4/libcurl.m4 $(top_srcdir)/m4/libgcrypt.m4 \
+-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+-	$(top_srcdir)/m4/lt~obsolete.m4 \
+-	$(top_srcdir)/m4/mhd_append_flag_to_var.m4 \
+-	$(top_srcdir)/m4/mhd_bool.m4 \
+-	$(top_srcdir)/m4/mhd_check_add_cc_cflag.m4 \
+-	$(top_srcdir)/m4/mhd_check_add_cc_cflags.m4 \
+-	$(top_srcdir)/m4/mhd_check_add_cc_ldflag.m4 \
+-	$(top_srcdir)/m4/mhd_check_add_cc_ldflags.m4 \
+-	$(top_srcdir)/m4/mhd_check_cc_cflag.m4 \
+-	$(top_srcdir)/m4/mhd_check_func.m4 \
+-	$(top_srcdir)/m4/mhd_check_func_gettimeofday.m4 \
+-	$(top_srcdir)/m4/mhd_check_func_run.m4 \
+-	$(top_srcdir)/m4/mhd_check_link_run.m4 \
+-	$(top_srcdir)/m4/mhd_find_add_cc_cflag.m4 \
+-	$(top_srcdir)/m4/mhd_find_add_cc_cflag_ifelse.m4 \
+-	$(top_srcdir)/m4/mhd_find_lib.m4 \
+-	$(top_srcdir)/m4/mhd_norm_expd.m4 \
+-	$(top_srcdir)/m4/mhd_prepend_flag_to_var.m4 \
+-	$(top_srcdir)/m4/mhd_shutdown_socket_trigger.m4 \
+-	$(top_srcdir)/m4/mhd_sys_extentions.m4 $(top_srcdir)/m4/pkg.m4 \
+-	$(top_srcdir)/configure.ac
+-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+-	$(ACLOCAL_M4)
+-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+-mkinstalldirs = $(install_sh) -d
+-CONFIG_HEADER = $(top_builddir)/MHD_config.h
+-CONFIG_CLEAN_FILES =
+-CONFIG_CLEAN_VPATH_FILES =
+-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+-am__vpath_adj = case $$p in \
+-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+-    *) f=$$p;; \
+-  esac;
+-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+-am__install_max = 40
+-am__nobase_strip_setup = \
+-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+-am__nobase_strip = \
+-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+-am__nobase_list = $(am__nobase_strip_setup); \
+-  for p in $$list; do echo "$$p $$p"; done | \
+-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+-    if (++n[$$2] == $(am__install_max)) \
+-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+-    END { for (dir in files) print dir, files[dir] }'
+-am__base_list = \
+-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+-am__uninstall_files_from_dir = { \
+-  test -z "$$files" \
+-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+-         $(am__cd) "$$dir" && rm -f $$files; }; \
+-  }
+-am__installdirs = "$(DESTDIR)$(libdir)"
+-LTLIBRARIES = $(lib_LTLIBRARIES)
+-am__DEPENDENCIES_1 =
+-libmicrohttpd_ws_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+-am_libmicrohttpd_ws_la_OBJECTS = libmicrohttpd_ws_la-sha1.lo \
+-	libmicrohttpd_ws_la-mhd_websocket.lo
+-libmicrohttpd_ws_la_OBJECTS = $(am_libmicrohttpd_ws_la_OBJECTS)
+-AM_V_lt = $(am__v_lt_@AM_V@)
+-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+-am__v_lt_0 = --silent
+-am__v_lt_1 = 
+-libmicrohttpd_ws_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+-	$(libmicrohttpd_ws_la_CFLAGS) $(CFLAGS) \
+-	$(libmicrohttpd_ws_la_LDFLAGS) $(LDFLAGS) -o $@
+-am_test_websocket_OBJECTS = test_websocket.$(OBJEXT)
+-test_websocket_OBJECTS = $(am_test_websocket_OBJECTS)
+-test_websocket_DEPENDENCIES =  \
+-	$(top_builddir)/src/microhttpd_ws/libmicrohttpd_ws.la \
+-	$(top_builddir)/src/microhttpd/libmicrohttpd.la
+-AM_V_P = $(am__v_P_@AM_V@)
+-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+-am__v_P_0 = false
+-am__v_P_1 = :
+-AM_V_GEN = $(am__v_GEN_@AM_V@)
+-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+-am__v_GEN_0 = @echo "  GEN     " $@;
+-am__v_GEN_1 = 
+-AM_V_at = $(am__v_at_@AM_V@)
+-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+-am__v_at_0 = @
+-am__v_at_1 = 
+-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+-am__maybe_remake_depfiles = depfiles
+-am__depfiles_remade =  \
+-	./$(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Plo \
+-	./$(DEPDIR)/libmicrohttpd_ws_la-sha1.Plo \
+-	./$(DEPDIR)/test_websocket.Po
+-am__mv = mv -f
+-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+-	$(AM_CFLAGS) $(CFLAGS)
+-AM_V_CC = $(am__v_CC_@AM_V@)
+-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+-am__v_CC_0 = @echo "  CC      " $@;
+-am__v_CC_1 = 
+-CCLD = $(CC)
+-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+-am__v_CCLD_0 = @echo "  CCLD    " $@;
+-am__v_CCLD_1 = 
+-SOURCES = $(libmicrohttpd_ws_la_SOURCES) $(test_websocket_SOURCES)
+-DIST_SOURCES = $(libmicrohttpd_ws_la_SOURCES) \
+-	$(test_websocket_SOURCES)
+-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+-	ctags-recursive dvi-recursive html-recursive info-recursive \
+-	install-data-recursive install-dvi-recursive \
+-	install-exec-recursive install-html-recursive \
+-	install-info-recursive install-pdf-recursive \
+-	install-ps-recursive install-recursive installcheck-recursive \
+-	installdirs-recursive pdf-recursive ps-recursive \
+-	tags-recursive uninstall-recursive
+-am__can_run_installinfo = \
+-  case $$AM_UPDATE_INFO_DIR in \
+-    n|no|NO) false;; \
+-    *) (install-info --version) >/dev/null 2>&1;; \
+-  esac
+-DATA = $(noinst_DATA)
+-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+-  distclean-recursive maintainer-clean-recursive
+-am__recursive_targets = \
+-  $(RECURSIVE_TARGETS) \
+-  $(RECURSIVE_CLEAN_TARGETS) \
+-  $(am__extra_recursive_targets)
+-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+-	check recheck distdir distdir-am
+-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+-# Read a list of newline-separated strings from the standard input,
+-# and print each of them once, without duplicates.  Input order is
+-# *not* preserved.
+-am__uniquify_input = $(AWK) '\
+-  BEGIN { nonempty = 0; } \
+-  { items[$$0] = 1; nonempty = 1; } \
+-  END { if (nonempty) { for (i in items) print i; }; } \
+-'
+-# Make sure the list of sources is unique.  This is necessary because,
+-# e.g., the same source file might be shared among _SOURCES variables
+-# for different programs/libraries.
+-am__define_uniq_tagged_files = \
+-  list='$(am__tagged_files)'; \
+-  unique=`for i in $$list; do \
+-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+-  done | $(am__uniquify_input)`
+-am__tty_colors_dummy = \
+-  mgn= red= grn= lgn= blu= brg= std=; \
+-  am__color_tests=no
+-am__tty_colors = { \
+-  $(am__tty_colors_dummy); \
+-  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+-    am__color_tests=no; \
+-  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+-    am__color_tests=yes; \
+-  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+-    am__color_tests=yes; \
+-  fi; \
+-  if test $$am__color_tests = yes; then \
+-    red=''; \
+-    grn=''; \
+-    lgn=''; \
+-    blu=''; \
+-    mgn=''; \
+-    brg=''; \
+-    std=''; \
+-  fi; \
+-}
+-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
+-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
+-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
+-# A command that, given a newline-separated list of test names on the
+-# standard input, print the name of the tests that are to be re-run
+-# upon "make recheck".
+-am__list_recheck_tests = $(AWK) '{ \
+-  recheck = 1; \
+-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+-    { \
+-      if (rc < 0) \
+-        { \
+-          if ((getline line2 < ($$0 ".log")) < 0) \
+-	    recheck = 0; \
+-          break; \
+-        } \
+-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+-        { \
+-          recheck = 0; \
+-          break; \
+-        } \
+-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+-        { \
+-          break; \
+-        } \
+-    }; \
+-  if (recheck) \
+-    print $$0; \
+-  close ($$0 ".trs"); \
+-  close ($$0 ".log"); \
+-}'
+-# A command that, given a newline-separated list of test names on the
+-# standard input, create the global log from their .trs and .log files.
+-am__create_global_log = $(AWK) ' \
+-function fatal(msg) \
+-{ \
+-  print "fatal: making $@: " msg | "cat >&2"; \
+-  exit 1; \
+-} \
+-function rst_section(header) \
+-{ \
+-  print header; \
+-  len = length(header); \
+-  for (i = 1; i <= len; i = i + 1) \
+-    printf "="; \
+-  printf "\n\n"; \
+-} \
+-{ \
+-  copy_in_global_log = 1; \
+-  global_test_result = "RUN"; \
+-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+-    { \
+-      if (rc < 0) \
+-         fatal("failed to read from " $$0 ".trs"); \
+-      if (line ~ /$(am__global_test_result_rx)/) \
+-        { \
+-          sub("$(am__global_test_result_rx)", "", line); \
+-          sub("[ 	]*$$", "", line); \
+-          global_test_result = line; \
+-        } \
+-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+-        copy_in_global_log = 0; \
+-    }; \
+-  if (copy_in_global_log) \
+-    { \
+-      rst_section(global_test_result ": " $$0); \
+-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+-      { \
+-        if (rc < 0) \
+-          fatal("failed to read from " $$0 ".log"); \
+-        print line; \
+-      }; \
+-      printf "\n"; \
+-    }; \
+-  close ($$0 ".trs"); \
+-  close ($$0 ".log"); \
+-}'
+-# Restructured Text title.
+-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+-# Solaris 10 'make', and several other traditional 'make' implementations,
+-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
+-# by disabling -e (using the XSI extension "set +e") if it's set.
+-am__sh_e_setup = case $$- in *e*) set +e;; esac
+-# Default flags passed to test drivers.
+-am__common_driver_flags = \
+-  --color-tests "$$am__color_tests" \
+-  --enable-hard-errors "$$am__enable_hard_errors" \
+-  --expect-failure "$$am__expect_failure"
+-# To be inserted before the command running the test.  Creates the
+-# directory for the log if needed.  Stores in $dir the directory
+-# containing $f, in $tst the test, in $log the log.  Executes the
+-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
+-# will run the test scripts (or their associated LOG_COMPILER, if
+-# thy have one).
+-am__check_pre = \
+-$(am__sh_e_setup);					\
+-$(am__vpath_adj_setup) $(am__vpath_adj)			\
+-$(am__tty_colors);					\
+-srcdir=$(srcdir); export srcdir;			\
+-case "$@" in						\
+-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
+-    *) am__odir=.;; 					\
+-esac;							\
+-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
+-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
+-if test -f "./$$f"; then dir=./;			\
+-elif test -f "$$f"; then dir=;				\
+-else dir="$(srcdir)/"; fi;				\
+-tst=$$dir$$f; log='$@'; 				\
+-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
+-  am__enable_hard_errors=no; 				\
+-else							\
+-  am__enable_hard_errors=yes; 				\
+-fi; 							\
+-case " $(XFAIL_TESTS) " in				\
+-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
+-    am__expect_failure=yes;;				\
+-  *)							\
+-    am__expect_failure=no;;				\
+-esac; 							\
+-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+-# A shell command to get the names of the tests scripts with any registered
+-# extension removed (i.e., equivalently, the names of the test logs, with
+-# the '.log' extension removed).  The result is saved in the shell variable
+-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
+-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+-# since that might cause problem with VPATH rewrites for suffix-less tests.
+-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+-am__set_TESTS_bases = \
+-  bases='$(TEST_LOGS)'; \
+-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+-  bases=`echo $$bases`
+-AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+-RECHECK_LOGS = $(TEST_LOGS)
+-TEST_SUITE_LOG = test-suite.log
+-TEST_EXTENSIONS = @EXEEXT@ .test
+-LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+-am__set_b = \
+-  case '$@' in \
+-    */*) \
+-      case '$*' in \
+-        */*) b='$*';; \
+-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+-       esac;; \
+-    *) \
+-      b='$*';; \
+-  esac
+-am__test_logs1 = $(TESTS:=.log)
+-am__test_logs2 = $(am__test_logs1:@[email protected]=.log)
+-TEST_LOGS = $(am__test_logs2:.test.log=.log)
+-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+-	$(TEST_LOG_FLAGS)
+-DIST_SUBDIRS = $(SUBDIRS)
+-am__DIST_COMMON = $(srcdir)/Makefile.in \
+-	$(top_srcdir)/build-aux/depcomp \
+-	$(top_srcdir)/build-aux/test-driver
+-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+-am__relativize = \
+-  dir0=`pwd`; \
+-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+-  sed_rest='s,^[^/]*/*,,'; \
+-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+-  sed_butlast='s,/*[^/]*$$,,'; \
+-  while test -n "$$dir1"; do \
+-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+-    if test "$$first" != "."; then \
+-      if test "$$first" = ".."; then \
+-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+-      else \
+-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+-        if test "$$first2" = "$$first"; then \
+-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+-        else \
+-          dir2="../$$dir2"; \
+-        fi; \
+-        dir0="$$dir0"/"$$first"; \
+-      fi; \
+-    fi; \
+-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+-  done; \
+-  reldir="$$dir2"
+-ACLOCAL = @ACLOCAL@
+-AMTAR = @AMTAR@
+-AM_ASAN_OPTIONS = @AM_ASAN_OPTIONS@
+-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+-AM_LSAN_OPTIONS = @AM_LSAN_OPTIONS@
+-AM_UBSAN_OPTIONS = @AM_UBSAN_OPTIONS@
+-AR = @AR@
+-AS = @AS@
+-AUTOCONF = @AUTOCONF@
+-AUTOHEADER = @AUTOHEADER@
+-AUTOMAKE = @AUTOMAKE@
+-AWK = @AWK@
+-CC = @CC@
+-CCDEPMODE = @CCDEPMODE@
+-CFLAGS = @CFLAGS@
+-CFLAGS_ac = @CFLAGS_ac@
+-CPP = @CPP@
+-CPPFLAGS = @CPPFLAGS@
+-CPPFLAGS_ac = @CPPFLAGS_ac@
+-CPU_COUNT = @CPU_COUNT@
+-CSCOPE = @CSCOPE@
+-CTAGS = @CTAGS@
+-CYGPATH_W = @CYGPATH_W@
+-DEFS = @DEFS@
+-DEPDIR = @DEPDIR@
+-DLLTOOL = @DLLTOOL@
+-DSYMUTIL = @DSYMUTIL@
+-DUMPBIN = @DUMPBIN@
+-ECHO_C = @ECHO_C@
+-ECHO_N = @ECHO_N@
+-ECHO_T = @ECHO_T@
+-EGREP = @EGREP@
+-EMPTY_VAR = @EMPTY_VAR@
+-ETAGS = @ETAGS@
+-EXEEXT = @EXEEXT@
+-FGREP = @FGREP@
+-FILECMD = @FILECMD@
+-GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+-GNUTLS_CPPFLAGS = @GNUTLS_CPPFLAGS@
+-GNUTLS_LDFLAGS = @GNUTLS_LDFLAGS@
+-GNUTLS_LIBS = @GNUTLS_LIBS@
+-GREP = @GREP@
+-HAVE_CURL_BINARY = @HAVE_CURL_BINARY@
+-HAVE_MAKEINFO_BINARY = @HAVE_MAKEINFO_BINARY@
+-HIDDEN_VISIBILITY_CFLAGS = @HIDDEN_VISIBILITY_CFLAGS@
+-INSTALL = @INSTALL@
+-INSTALL_DATA = @INSTALL_DATA@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+-LD = @LD@
+-LDFLAGS = @LDFLAGS@
+-LDFLAGS_ac = @LDFLAGS_ac@
+-LIBCURL = @LIBCURL@
+-LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+-LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+-LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+-LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+-LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
+-LIBTOOL = @LIBTOOL@
+-LIB_VERSION_AGE = @LIB_VERSION_AGE@
+-LIB_VERSION_CURRENT = @LIB_VERSION_CURRENT@
+-LIB_VERSION_REVISION = @LIB_VERSION_REVISION@
+-LIPO = @LIPO@
+-LN_S = @LN_S@
+-LTLIBOBJS = @LTLIBOBJS@
+-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+-MAKEINFO = @MAKEINFO@
+-MANIFEST_TOOL = @MANIFEST_TOOL@
+-MHD_AUX_DIR = @MHD_AUX_DIR@
+-MHD_LIBDEPS = @MHD_LIBDEPS@
+-MHD_LIBDEPS_PKGCFG = @MHD_LIBDEPS_PKGCFG@
+-MHD_LIB_CFLAGS = @MHD_LIB_CFLAGS@
+-MHD_LIB_CPPFLAGS = @MHD_LIB_CPPFLAGS@
+-MHD_LIB_LDFLAGS = @MHD_LIB_LDFLAGS@
+-MHD_PLUGIN_INSTALL_PREFIX = @MHD_PLUGIN_INSTALL_PREFIX@
+-MHD_REQ_PRIVATE = @MHD_REQ_PRIVATE@
+-MHD_TLS_LIBDEPS = @MHD_TLS_LIBDEPS@
+-MHD_TLS_LIB_CFLAGS = @MHD_TLS_LIB_CFLAGS@
+-MHD_TLS_LIB_CPPFLAGS = @MHD_TLS_LIB_CPPFLAGS@
+-MHD_TLS_LIB_LDFLAGS = @MHD_TLS_LIB_LDFLAGS@
+-MHD_W32_DLL_SUFF = @MHD_W32_DLL_SUFF@
+-MKDIR_P = @MKDIR_P@
+-MS_LIB_TOOL = @MS_LIB_TOOL@
+-NM = @NM@
+-NMEDIT = @NMEDIT@
+-OBJDUMP = @OBJDUMP@
+-OBJEXT = @OBJEXT@
+-OTOOL = @OTOOL@
+-OTOOL64 = @OTOOL64@
+-PACKAGE = @PACKAGE@
+-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+-PACKAGE_NAME = @PACKAGE_NAME@
+-PACKAGE_STRING = @PACKAGE_STRING@
+-PACKAGE_TARNAME = @PACKAGE_TARNAME@
+-PACKAGE_URL = @PACKAGE_URL@
+-PACKAGE_VERSION = @PACKAGE_VERSION@
+-PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+-PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+-PACKAGE_VERSION_SUBMINOR = @PACKAGE_VERSION_SUBMINOR@
+-PATH_SEPARATOR = @PATH_SEPARATOR@
+-PKG_CONFIG = @PKG_CONFIG@
+-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+-PTHREAD_CC = @PTHREAD_CC@
+-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+-PTHREAD_CXX = @PTHREAD_CXX@
+-PTHREAD_LIBS = @PTHREAD_LIBS@
+-RANLIB = @RANLIB@
+-RC = @RC@
+-SED = @SED@
+-SET_MAKE = @SET_MAKE@
+-SHELL = @SHELL@
+-SOCAT = @SOCAT@
+-STRIP = @STRIP@
+-TESTS_ENVIRONMENT_ac = @TESTS_ENVIRONMENT_ac@
+-VERSION = @VERSION@
+-W32CRT = @W32CRT@
+-ZZUF = @ZZUF@
+-_libcurl_config = @_libcurl_config@
+-abs_builddir = @abs_builddir@
+-abs_srcdir = @abs_srcdir@
+-abs_top_builddir = @abs_top_builddir@
+-abs_top_srcdir = @abs_top_srcdir@
+-ac_configure_args = @ac_configure_args@
+-ac_ct_AR = @ac_ct_AR@
+-ac_ct_CC = @ac_ct_CC@
+-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+-am__include = @am__include@
+-am__leading_dot = @am__leading_dot@
+-am__quote = @am__quote@
+-am__tar = @am__tar@
+-am__untar = @am__untar@
+-ax_pthread_config = @ax_pthread_config@
+-bindir = @bindir@
+-build = @build@
+-build_alias = @build_alias@
+-build_cpu = @build_cpu@
+-build_os = @build_os@
+-build_vendor = @build_vendor@
+-builddir = @builddir@
+-datadir = @datadir@
+-datarootdir = @datarootdir@
+-docdir = @docdir@
+-dvidir = @dvidir@
+-exec_prefix = @exec_prefix@
+-host = @host@
+-host_alias = @host_alias@
+-host_cpu = @host_cpu@
+-host_os = @host_os@
+-host_vendor = @host_vendor@
+-htmldir = @htmldir@
+-includedir = @includedir@
+-infodir = @infodir@
+-install_sh = @install_sh@
+-libdir = @libdir@
+-libexecdir = @libexecdir@
+-localedir = @localedir@
+-localstatedir = @localstatedir@
+-lt_cv_objdir = @lt_cv_objdir@
+-mandir = @mandir@
+-mkdir_p = @mkdir_p@
+-oldincludedir = @oldincludedir@
+-pdfdir = @pdfdir@
+-prefix = @prefix@
+-program_transform_name = @program_transform_name@
+-psdir = @psdir@
+-runstatedir = @runstatedir@
+-sbindir = @sbindir@
+-sharedstatedir = @sharedstatedir@
+-srcdir = @srcdir@
+-sysconfdir = @sysconfdir@
+-target_alias = @target_alias@
+-top_build_prefix = @top_build_prefix@
+-top_builddir = @top_builddir@
+-top_srcdir = @top_srcdir@
+-
+-# This Makefile.am is in the public domain
+-AM_CPPFLAGS = \
+-  -I$(top_srcdir)/src/include \
+-  -I$(top_srcdir)/src/microhttpd
+-
+-AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS)
+-noinst_DATA = 
+-MOSTLYCLEANFILES = 
+-SUBDIRS = .
+-lib_LTLIBRARIES = \
+-  libmicrohttpd_ws.la
+-
+-libmicrohttpd_ws_la_SOURCES = \
+-  sha1.c sha1.h \
+-  mhd_websocket.c
+-
+-libmicrohttpd_ws_la_CPPFLAGS = \
+-  $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \
+-  -DBUILDING_MHD_LIB=1
+-
+-libmicrohttpd_ws_la_CFLAGS = \
+-  $(AM_CFLAGS) $(MHD_LIB_CFLAGS)
+-
+-libmicrohttpd_ws_la_LDFLAGS = \
+-  $(MHD_LIB_LDFLAGS) \
+-  $(W32_MHD_LIB_LDFLAGS) \
+-  -version-info 0:0:0
+-
+-libmicrohttpd_ws_la_LIBADD = \
+-  $(MHD_LIBDEPS)
+-
+-TESTS = $(check_PROGRAMS)
+-test_websocket_SOURCES = \
+-  test_websocket.c
+-
+-test_websocket_LDADD = \
+-  $(top_builddir)/src/microhttpd_ws/libmicrohttpd_ws.la \
+-  $(top_builddir)/src/microhttpd/libmicrohttpd.la
+-
+-all: all-recursive
+-
+-.SUFFIXES:
+-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+-	@for dep in $?; do \
+-	  case '$(am__configure_deps)' in \
+-	    *$$dep*) \
+-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+-	        && { if test -f $@; then exit 0; else break; fi; }; \
+-	      exit 1;; \
+-	  esac; \
+-	done; \
+-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/microhttpd_ws/Makefile'; \
+-	$(am__cd) $(top_srcdir) && \
+-	  $(AUTOMAKE) --gnu src/microhttpd_ws/Makefile
+-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+-	@case '$?' in \
+-	  *config.status*) \
+-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+-	  *) \
+-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+-	esac;
+-
+-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+-
+-$(top_srcdir)/configure:  $(am__configure_deps)
+-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+-$(am__aclocal_m4_deps):
+-
+-clean-checkPROGRAMS:
+-	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+-	echo " rm -f" $$list; \
+-	rm -f $$list || exit $$?; \
+-	test -n "$(EXEEXT)" || exit 0; \
+-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+-	echo " rm -f" $$list; \
+-	rm -f $$list
+-
+-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+-	@$(NORMAL_INSTALL)
+-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+-	list2=; for p in $$list; do \
+-	  if test -f $$p; then \
+-	    list2="$$list2 $$p"; \
+-	  else :; fi; \
+-	done; \
+-	test -z "$$list2" || { \
+-	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+-	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+-	}
+-
+-uninstall-libLTLIBRARIES:
+-	@$(NORMAL_UNINSTALL)
+-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+-	for p in $$list; do \
+-	  $(am__strip_dir) \
+-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+-	done
+-
+-clean-libLTLIBRARIES:
+-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+-	@list='$(lib_LTLIBRARIES)'; \
+-	locs=`for p in $$list; do echo $$p; done | \
+-	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+-	      sort -u`; \
+-	test -z "$$locs" || { \
+-	  echo rm -f $${locs}; \
+-	  rm -f $${locs}; \
+-	}
+-
+-libmicrohttpd_ws.la: $(libmicrohttpd_ws_la_OBJECTS) $(libmicrohttpd_ws_la_DEPENDENCIES) $(EXTRA_libmicrohttpd_ws_la_DEPENDENCIES) 
+-	$(AM_V_CCLD)$(libmicrohttpd_ws_la_LINK) -rpath $(libdir) $(libmicrohttpd_ws_la_OBJECTS) $(libmicrohttpd_ws_la_LIBADD) $(LIBS)
+-
+-test_websocket$(EXEEXT): $(test_websocket_OBJECTS) $(test_websocket_DEPENDENCIES) $(EXTRA_test_websocket_DEPENDENCIES) 
+-	@rm -f test_websocket$(EXEEXT)
+-	$(AM_V_CCLD)$(LINK) $(test_websocket_OBJECTS) $(test_websocket_LDADD) $(LIBS)
+-
+-mostlyclean-compile:
+-	-rm -f *.$(OBJEXT)
+-
+-distclean-compile:
+-	-rm -f *.tab.c
+-
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Plo@am__quote@ # am--include-marker
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmicrohttpd_ws_la-sha1.Plo@am__quote@ # am--include-marker
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_websocket.Po@am__quote@ # am--include-marker
+-
+-$(am__depfiles_remade):
+-	@$(MKDIR_P) $(@D)
+-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+-
+-am--depfiles: $(am__depfiles_remade)
+-
+-.c.o:
+-@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+-@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+-@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+-
+-.c.obj:
+-@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+-@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+-@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+-
+-.c.lo:
+-@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+-@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+-@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+-
+-libmicrohttpd_ws_la-sha1.lo: sha1.c
+-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_ws_la_CPPFLAGS) $(CPPFLAGS) $(libmicrohttpd_ws_la_CFLAGS) $(CFLAGS) -MT libmicrohttpd_ws_la-sha1.lo -MD -MP -MF $(DEPDIR)/libmicrohttpd_ws_la-sha1.Tpo -c -o libmicrohttpd_ws_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libmicrohttpd_ws_la-sha1.Tpo $(DEPDIR)/libmicrohttpd_ws_la-sha1.Plo
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sha1.c' object='libmicrohttpd_ws_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_ws_la_CPPFLAGS) $(CPPFLAGS) $(libmicrohttpd_ws_la_CFLAGS) $(CFLAGS) -c -o libmicrohttpd_ws_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+-
+-libmicrohttpd_ws_la-mhd_websocket.lo: mhd_websocket.c
+-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_ws_la_CPPFLAGS) $(CPPFLAGS) $(libmicrohttpd_ws_la_CFLAGS) $(CFLAGS) -MT libmicrohttpd_ws_la-mhd_websocket.lo -MD -MP -MF $(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Tpo -c -o libmicrohttpd_ws_la-mhd_websocket.lo `test -f 'mhd_websocket.c' || echo '$(srcdir)/'`mhd_websocket.c
+-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Tpo $(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Plo
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='mhd_websocket.c' object='libmicrohttpd_ws_la-mhd_websocket.lo' libtool=yes @AMDEPBACKSLASH@
+-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_ws_la_CPPFLAGS) $(CPPFLAGS) $(libmicrohttpd_ws_la_CFLAGS) $(CFLAGS) -c -o libmicrohttpd_ws_la-mhd_websocket.lo `test -f 'mhd_websocket.c' || echo '$(srcdir)/'`mhd_websocket.c
+-
+-mostlyclean-libtool:
+-	-rm -f *.lo
+-
+-clean-libtool:
+-	-rm -rf .libs _libs
+-
+-# This directory's subdirectories are mostly independent; you can cd
+-# into them and run 'make' without going through this Makefile.
+-# To change the values of 'make' variables: instead of editing Makefiles,
+-# (1) if the variable is set in 'config.status', edit 'config.status'
+-#     (which will cause the Makefiles to be regenerated when you run 'make');
+-# (2) otherwise, pass the desired values on the 'make' command line.
+-$(am__recursive_targets):
+-	@fail=; \
+-	if $(am__make_keepgoing); then \
+-	  failcom='fail=yes'; \
+-	else \
+-	  failcom='exit 1'; \
+-	fi; \
+-	dot_seen=no; \
+-	target=`echo $@ | sed s/-recursive//`; \
+-	case "$@" in \
+-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+-	  *) list='$(SUBDIRS)' ;; \
+-	esac; \
+-	for subdir in $$list; do \
+-	  echo "Making $$target in $$subdir"; \
+-	  if test "$$subdir" = "."; then \
+-	    dot_seen=yes; \
+-	    local_target="$$target-am"; \
+-	  else \
+-	    local_target="$$target"; \
+-	  fi; \
+-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+-	  || eval $$failcom; \
+-	done; \
+-	if test "$$dot_seen" = "no"; then \
+-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+-	fi; test -z "$$fail"
+-
+-ID: $(am__tagged_files)
+-	$(am__define_uniq_tagged_files); mkid -fID $$unique
+-tags: tags-recursive
+-TAGS: tags
+-
+-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+-	set x; \
+-	here=`pwd`; \
+-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+-	  include_option=--etags-include; \
+-	  empty_fix=.; \
+-	else \
+-	  include_option=--include; \
+-	  empty_fix=; \
+-	fi; \
+-	list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  if test "$$subdir" = .; then :; else \
+-	    test ! -f $$subdir/TAGS || \
+-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+-	  fi; \
+-	done; \
+-	$(am__define_uniq_tagged_files); \
+-	shift; \
+-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+-	  test -n "$$unique" || unique=$$empty_fix; \
+-	  if test $$# -gt 0; then \
+-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+-	      "$$@" $$unique; \
+-	  else \
+-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+-	      $$unique; \
+-	  fi; \
+-	fi
+-ctags: ctags-recursive
+-
+-CTAGS: ctags
+-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+-	$(am__define_uniq_tagged_files); \
+-	test -z "$(CTAGS_ARGS)$$unique" \
+-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+-	     $$unique
+-
+-GTAGS:
+-	here=`$(am__cd) $(top_builddir) && pwd` \
+-	  && $(am__cd) $(top_srcdir) \
+-	  && gtags -i $(GTAGS_ARGS) "$$here"
+-cscopelist: cscopelist-recursive
+-
+-cscopelist-am: $(am__tagged_files)
+-	list='$(am__tagged_files)'; \
+-	case "$(srcdir)" in \
+-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+-	  *) sdir=$(subdir)/$(srcdir) ;; \
+-	esac; \
+-	for i in $$list; do \
+-	  if test -f "$$i"; then \
+-	    echo "$(subdir)/$$i"; \
+-	  else \
+-	    echo "$$sdir/$$i"; \
+-	  fi; \
+-	done >> $(top_builddir)/cscope.files
+-
+-distclean-tags:
+-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+-
+-# Recover from deleted '.trs' file; this should ensure that
+-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
+-# to avoid problems with "make -n".
+-.log.trs:
+-	rm -f $< $@
+-	$(MAKE) $(AM_MAKEFLAGS) $<
+-
+-# Leading 'am--fnord' is there to ensure the list of targets does not
+-# expand to empty, as could happen e.g. with make check TESTS=''.
+-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+-am--force-recheck:
+-	@:
+-
+-$(TEST_SUITE_LOG): $(TEST_LOGS)
+-	@$(am__set_TESTS_bases); \
+-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+-	redo_bases=`for i in $$bases; do \
+-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+-	            done`; \
+-	if test -n "$$redo_bases"; then \
+-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+-	  if $(am__make_dryrun); then :; else \
+-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+-	  fi; \
+-	fi; \
+-	if test -n "$$am__remaking_logs"; then \
+-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+-	       "recursion detected" >&2; \
+-	elif test -n "$$redo_logs"; then \
+-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+-	fi; \
+-	if $(am__make_dryrun); then :; else \
+-	  st=0;  \
+-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+-	  for i in $$redo_bases; do \
+-	    test -f $$i.trs && test -r $$i.trs \
+-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+-	    test -f $$i.log && test -r $$i.log \
+-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+-	  done; \
+-	  test $$st -eq 0 || exit 1; \
+-	fi
+-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+-	ws='[ 	]'; \
+-	results=`for b in $$bases; do echo $$b.trs; done`; \
+-	test -n "$$results" || results=/dev/null; \
+-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+-	  success=true; \
+-	else \
+-	  success=false; \
+-	fi; \
+-	br='==================='; br=$$br$$br$$br$$br; \
+-	result_count () \
+-	{ \
+-	    if test x"$$1" = x"--maybe-color"; then \
+-	      maybe_colorize=yes; \
+-	    elif test x"$$1" = x"--no-color"; then \
+-	      maybe_colorize=no; \
+-	    else \
+-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+-	    fi; \
+-	    shift; \
+-	    desc=$$1 count=$$2; \
+-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
+-	      color_start=$$3 color_end=$$std; \
+-	    else \
+-	      color_start= color_end=; \
+-	    fi; \
+-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
+-	}; \
+-	create_testsuite_report () \
+-	{ \
+-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
+-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
+-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
+-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
+-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
+-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
+-	}; \
+-	{								\
+-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
+-	    $(am__rst_title);						\
+-	  create_testsuite_report --no-color;				\
+-	  echo;								\
+-	  echo ".. contents:: :depth: 2";				\
+-	  echo;								\
+-	  for b in $$bases; do echo $$b; done				\
+-	    | $(am__create_global_log);					\
+-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
+-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
+-	if $$success; then						\
+-	  col="$$grn";							\
+-	 else								\
+-	  col="$$red";							\
+-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
+-	fi;								\
+-	echo "$${col}$$br$${std}"; 					\
+-	echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}";	\
+-	echo "$${col}$$br$${std}"; 					\
+-	create_testsuite_report --maybe-color;				\
+-	echo "$$col$$br$$std";						\
+-	if $$success; then :; else					\
+-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
+-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
+-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
+-	  fi;								\
+-	  echo "$$col$$br$$std";					\
+-	fi;								\
+-	$$success || exit 1
+-
+-check-TESTS: $(check_PROGRAMS)
+-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+-	@set +e; $(am__set_TESTS_bases); \
+-	log_list=`for i in $$bases; do echo $$i.log; done`; \
+-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+-	exit $$?;
+-recheck: all $(check_PROGRAMS)
+-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+-	@set +e; $(am__set_TESTS_bases); \
+-	bases=`for i in $$bases; do echo $$i; done \
+-	         | $(am__list_recheck_tests)` || exit 1; \
+-	log_list=`for i in $$bases; do echo $$i.log; done`; \
+-	log_list=`echo $$log_list`; \
+-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+-	        am__force_recheck=am--force-recheck \
+-	        TEST_LOGS="$$log_list"; \
+-	exit $$?
+-test_websocket.log: test_websocket$(EXEEXT)
+-	@p='test_websocket$(EXEEXT)'; \
+-	b='test_websocket'; \
+-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+-	--log-file $$b.log --trs-file $$b.trs \
+-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+-	"$$tst" $(AM_TESTS_FD_REDIRECT)
+-.test.log:
+-	@p='$<'; \
+-	$(am__set_b); \
+-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+-	--log-file $$b.log --trs-file $$b.trs \
+-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+-	"$$tst" $(AM_TESTS_FD_REDIRECT)
+-@[email protected]$(EXEEXT).log:
+-@am__EXEEXT_TRUE@	@p='$<'; \
+-@am__EXEEXT_TRUE@	$(am__set_b); \
+-@am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+-@am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
+-@am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+-@am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+-distdir: $(BUILT_SOURCES)
+-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+-
+-distdir-am: $(DISTFILES)
+-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+-	list='$(DISTFILES)'; \
+-	  dist_files=`for file in $$list; do echo $$file; done | \
+-	  sed -e "s|^$$srcdirstrip/||;t" \
+-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+-	case $$dist_files in \
+-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+-			   sort -u` ;; \
+-	esac; \
+-	for file in $$dist_files; do \
+-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+-	  if test -d $$d/$$file; then \
+-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+-	    if test -d "$(distdir)/$$file"; then \
+-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+-	    fi; \
+-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+-	    fi; \
+-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+-	  else \
+-	    test -f "$(distdir)/$$file" \
+-	    || cp -p $$d/$$file "$(distdir)/$$file" \
+-	    || exit 1; \
+-	  fi; \
+-	done
+-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+-	  if test "$$subdir" = .; then :; else \
+-	    $(am__make_dryrun) \
+-	      || test -d "$(distdir)/$$subdir" \
+-	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+-	      || exit 1; \
+-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+-	    $(am__relativize); \
+-	    new_distdir=$$reldir; \
+-	    dir1=$$subdir; dir2="$(top_distdir)"; \
+-	    $(am__relativize); \
+-	    new_top_distdir=$$reldir; \
+-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+-	    ($(am__cd) $$subdir && \
+-	      $(MAKE) $(AM_MAKEFLAGS) \
+-	        top_distdir="$$new_top_distdir" \
+-	        distdir="$$new_distdir" \
+-		am__remove_distdir=: \
+-		am__skip_length_check=: \
+-		am__skip_mode_fix=: \
+-	        distdir) \
+-	      || exit 1; \
+-	  fi; \
+-	done
+-check-am: all-am
+-	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+-	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+-check: check-recursive
+-all-am: Makefile $(LTLIBRARIES) $(DATA)
+-install-checkPROGRAMS: install-libLTLIBRARIES
+-
+-installdirs: installdirs-recursive
+-installdirs-am:
+-	for dir in "$(DESTDIR)$(libdir)"; do \
+-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+-	done
+-install: install-recursive
+-install-exec: install-exec-recursive
+-install-data: install-data-recursive
+-uninstall: uninstall-recursive
+-
+-install-am: all-am
+-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+-
+-installcheck: installcheck-recursive
+-install-strip:
+-	if test -z '$(STRIP)'; then \
+-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+-	      install; \
+-	else \
+-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+-	fi
+-mostlyclean-generic:
+-	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+-
+-clean-generic:
+-
+-distclean-generic:
+-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+-
+-maintainer-clean-generic:
+-	@echo "This command is intended for maintainers to use"
+-	@echo "it deletes files that may require special tools to rebuild."
+-clean: clean-recursive
+-
+-clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+-	clean-libtool mostlyclean-am
+-
+-distclean: distclean-recursive
+-		-rm -f ./$(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Plo
+-	-rm -f ./$(DEPDIR)/libmicrohttpd_ws_la-sha1.Plo
+-	-rm -f ./$(DEPDIR)/test_websocket.Po
+-	-rm -f Makefile
+-distclean-am: clean-am distclean-compile distclean-generic \
+-	distclean-tags
+-
+-dvi: dvi-recursive
+-
+-dvi-am:
+-
+-html: html-recursive
+-
+-html-am:
+-
+-info: info-recursive
+-
+-info-am:
+-
+-install-data-am:
+-
+-install-dvi: install-dvi-recursive
+-
+-install-dvi-am:
+-
+-install-exec-am: install-libLTLIBRARIES
+-
+-install-html: install-html-recursive
+-
+-install-html-am:
+-
+-install-info: install-info-recursive
+-
+-install-info-am:
+-
+-install-man:
+-
+-install-pdf: install-pdf-recursive
+-
+-install-pdf-am:
+-
+-install-ps: install-ps-recursive
+-
+-install-ps-am:
+-
+-installcheck-am:
+-
+-maintainer-clean: maintainer-clean-recursive
+-		-rm -f ./$(DEPDIR)/libmicrohttpd_ws_la-mhd_websocket.Plo
+-	-rm -f ./$(DEPDIR)/libmicrohttpd_ws_la-sha1.Plo
+-	-rm -f ./$(DEPDIR)/test_websocket.Po
+-	-rm -f Makefile
+-maintainer-clean-am: distclean-am maintainer-clean-generic
+-
+-mostlyclean: mostlyclean-recursive
+-
+-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+-	mostlyclean-libtool
+-
+-pdf: pdf-recursive
+-
+-pdf-am:
+-
+-ps: ps-recursive
+-
+-ps-am:
+-
+-uninstall-am: uninstall-libLTLIBRARIES
+-
+-.MAKE: $(am__recursive_targets) check-am install-am install-strip
+-
+-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+-	am--depfiles check check-TESTS check-am clean \
+-	clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+-	clean-libtool cscopelist-am ctags ctags-am distclean \
+-	distclean-compile distclean-generic distclean-libtool \
+-	distclean-tags distdir dvi dvi-am html html-am info info-am \
+-	install install-am install-data install-data-am install-dvi \
+-	install-dvi-am install-exec install-exec-am install-html \
+-	install-html-am install-info install-info-am \
+-	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+-	install-ps install-ps-am install-strip installcheck \
+-	installcheck-am installdirs installdirs-am maintainer-clean \
+-	maintainer-clean-generic mostlyclean mostlyclean-compile \
+-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+-	recheck tags tags-am uninstall uninstall-am \
+-	uninstall-libLTLIBRARIES
+-
+-.PRECIOUS: Makefile
+-
+-
+-$(top_builddir)/src/microhttpd/libmicrohttpd.la: $(top_builddir)/src/microhttpd/Makefile
+-	@echo ' cd $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la'; \
+-	$(am__cd) $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la
+-
+-# Tell versions [3.59,3.63) of GNU make to not export all variables.
+-# Otherwise a system limit (for SysV at least) may be exceeded.
+-.NOEXPORT:
+diff --git a/src/microhttpd_ws/mhd_websocket.c b/src/microhttpd_ws/mhd_websocket.c
+deleted file mode 100644
+index 935deee..0000000
+--- a/src/microhttpd_ws/mhd_websocket.c
++++ /dev/null
+@@ -1,2443 +0,0 @@
+-/*
+-  This file is part of libmicrohttpd
+-  Copyright (C) 2021 David Gausmann
+-
+-  This library is free software; you can redistribute it and/or
+-  modify it under the terms of the GNU Lesser General Public
+-  License as published by the Free Software Foundation; either
+-  version 2.1 of the License, or (at your option) any later version.
+-
+-  This library is distributed in the hope that it will be useful,
+-  but WITHOUT ANY WARRANTY; without even the implied warranty of
+-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-  Lesser General Public License for more details.
+-
+-  You should have received a copy of the GNU Lesser General Public
+-  License along with this library; if not, write to the Free Software
+-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+-
+-*/
+-
+-/**
+- * @file microhttpd_ws/mhd_websocket.c
+- * @brief  Support for the websocket protocol
+- * @author David Gausmann
+- */
+-#include "platform.h"
+-#include "microhttpd.h"
+-#include "microhttpd_ws.h"
+-#include "sha1.h"
+-
+-struct MHD_WebSocketStream
+-{
+-  /* The function pointer to malloc for payload (can be used to use different memory management) */
+-  MHD_WebSocketMallocCallback malloc;
+-  /* The function pointer to realloc for payload (can be used to use different memory management) */
+-  MHD_WebSocketReallocCallback realloc;
+-  /* The function pointer to free for payload (can be used to use different memory management) */
+-  MHD_WebSocketFreeCallback free;
+-  /* A closure for the random number generator (only used for client mode; usually not required) */
+-  void *cls_rng;
+-  /* The random number generator (only used for client mode; usually not required) */
+-  MHD_WebSocketRandomNumberGenerator rng;
+-  /* The flags specified upon initialization. It may alter the behavior of decoding/encoding */
+-  int flags;
+-  /* The current step for the decoder. 0 means start of a frame. */
+-  char decode_step;
+-  /* Specifies whether the stream is valid (1) or not (0),
+-     if a close frame has been received this is (-1) to indicate that no data frames are allowed anymore  */
+-  char validity;
+-  /* The current step of the UTF-8 encoding check in the data payload */
+-  char data_utf8_step;
+-  /* The current step of the UTF-8 encoding check in the control payload */
+-  char control_utf8_step;
+-  /* if != 0 means that we expect a CONTINUATION frame */
+-  char data_type;
+-  /* The start of the current frame (may differ from data_payload for CONTINUATION frames) */
+-  char *data_payload_start;
+-  /* The buffer for the data frame */
+-  char *data_payload;
+-  /* The buffer for the control frame */
+-  char *control_payload;
+-  /* Configuration for the maximum allowed buffer size for payload data */
+-  size_t max_payload_size;
+-  /* The current frame header size */
+-  size_t frame_header_size;
+-  /* The current data payload size (can be greater than payload_size for fragmented frames) */
+-  size_t data_payload_size;
+-  /* The size of the payload of the current frame (control or data) */
+-  size_t payload_size;
+-  /* The processing offset to the start of the payload of the current frame (control or data) */
+-  size_t payload_index;
+-  /* The frame header of the current frame (control or data) */
+-  char frame_header[32];
+-  /* The mask key of the current frame (control or data); this is 0 if no masking used */
+-  char mask_key[4];
+-};
+-
+-#define MHD_WEBSOCKET_FLAG_MASK_SERVERCLIENT          MHD_WEBSOCKET_FLAG_CLIENT
+-#define MHD_WEBSOCKET_FLAG_MASK_FRAGMENTATION         \
+-  MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS
+-#define MHD_WEBSOCKET_FLAG_MASK_GENERATE_CLOSE_FRAMES \
+-  MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR
+-#define MHD_WEBSOCKET_FLAG_MASK_ALL                   \
+-  (MHD_WEBSOCKET_FLAG_MASK_SERVERCLIENT                                                       \
+-   | MHD_WEBSOCKET_FLAG_MASK_FRAGMENTATION   \
+-   | MHD_WEBSOCKET_FLAG_MASK_GENERATE_CLOSE_FRAMES)
+-
+-enum MHD_WebSocket_Opcode
+-{
+-  MHD_WebSocket_Opcode_Continuation = 0x0,
+-  MHD_WebSocket_Opcode_Text         = 0x1,
+-  MHD_WebSocket_Opcode_Binary       = 0x2,
+-  MHD_WebSocket_Opcode_Close        = 0x8,
+-  MHD_WebSocket_Opcode_Ping         = 0x9,
+-  MHD_WebSocket_Opcode_Pong         = 0xA
+-};
+-
+-enum MHD_WebSocket_DecodeStep
+-{
+-  MHD_WebSocket_DecodeStep_Start                 =  0,
+-  MHD_WebSocket_DecodeStep_Length1ofX            =  1,
+-  MHD_WebSocket_DecodeStep_Length1of2            =  2,
+-  MHD_WebSocket_DecodeStep_Length2of2            =  3,
+-  MHD_WebSocket_DecodeStep_Length1of8            =  4,
+-  MHD_WebSocket_DecodeStep_Length2of8            =  5,
+-  MHD_WebSocket_DecodeStep_Length3of8            =  6,
+-  MHD_WebSocket_DecodeStep_Length4of8            =  7,
+-  MHD_WebSocket_DecodeStep_Length5of8            =  8,
+-  MHD_WebSocket_DecodeStep_Length6of8            =  9,
+-  MHD_WebSocket_DecodeStep_Length7of8            = 10,
+-  MHD_WebSocket_DecodeStep_Length8of8            = 11,
+-  MHD_WebSocket_DecodeStep_Mask1Of4              = 12,
+-  MHD_WebSocket_DecodeStep_Mask2Of4              = 13,
+-  MHD_WebSocket_DecodeStep_Mask3Of4              = 14,
+-  MHD_WebSocket_DecodeStep_Mask4Of4              = 15,
+-  MHD_WebSocket_DecodeStep_HeaderCompleted       = 16,
+-  MHD_WebSocket_DecodeStep_PayloadOfDataFrame    = 17,
+-  MHD_WebSocket_DecodeStep_PayloadOfControlFrame = 18,
+-  MHD_WebSocket_DecodeStep_BrokenStream          = 99
+-};
+-
+-enum MHD_WebSocket_UTF8Result
+-{
+-  MHD_WebSocket_UTF8Result_Invalid    = 0,
+-  MHD_WebSocket_UTF8Result_Valid      = 1,
+-  MHD_WebSocket_UTF8Result_Incomplete = 2
+-};
+-
+-static void
+-MHD_websocket_copy_payload (char *dst,
+-                            const char *src,
+-                            size_t len,
+-                            uint32_t mask,
+-                            unsigned long mask_offset);
+-
+-static int
+-MHD_websocket_check_utf8 (const char *buf,
+-                          size_t buf_len,
+-                          int *utf8_step,
+-                          size_t *buf_offset);
+-
+-static enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_decode_header_complete (struct MHD_WebSocketStream *ws,
+-                                      char **payload,
+-                                      size_t *payload_len);
+-
+-static enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_decode_payload_complete (struct MHD_WebSocketStream *ws,
+-                                       char **payload,
+-                                       size_t *payload_len);
+-
+-static char
+-MHD_websocket_encode_is_masked (struct MHD_WebSocketStream *ws);
+-static char
+-MHD_websocket_encode_overhead_size (struct MHD_WebSocketStream *ws,
+-                                    size_t payload_len);
+-
+-static enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_encode_data (struct MHD_WebSocketStream *ws,
+-                           const char *payload,
+-                           size_t payload_len,
+-                           int fragmentation,
+-                           char **frame,
+-                           size_t *frame_len,
+-                           char opcode);
+-
+-static enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_encode_ping_pong (struct MHD_WebSocketStream *ws,
+-                                const char *payload,
+-                                size_t payload_len,
+-                                char **frame,
+-                                size_t *frame_len,
+-                                char opcode);
+-
+-static uint32_t
+-MHD_websocket_generate_mask (struct MHD_WebSocketStream *ws);
+-
+-static uint16_t
+-MHD_htons (uint16_t value);
+-
+-static uint64_t
+-MHD_htonll (uint64_t value);
+-
+-
+-/**
+- * Checks whether the HTTP version is 1.1 or above.
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_check_http_version (const char *http_version)
+-{
+-  /* validate parameters */
+-  if (NULL == http_version)
+-  {
+-    /* Like with the other check routines, */
+-    /* NULL is threated as "value not given" and not as parameter error */
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-
+-  /* Check whether the version has a valid format */
+-  /* RFC 1945 3.1: The format must be "HTTP/x.x" where x is */
+-  /* any digit and must appear at least once */
+-  if (('H' != http_version[0]) ||
+-      ('T' != http_version[1]) ||
+-      ('T' != http_version[2]) ||
+-      ('P' != http_version[3]) ||
+-      ('/' != http_version[4]))
+-  {
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-
+-  /* Find the major and minor part of the version */
+-  /* RFC 1945 3.1: Both numbers must be threated as separate integers. */
+-  /* Leading zeros must be ignored and both integers may have multiple digits */
+-  const char *major = NULL;
+-  const char *dot   = NULL;
+-  size_t i = 5;
+-  for (;;)
+-  {
+-    char c = http_version[i];
+-    if (('0' <= c) && ('9' >= c))
+-    {
+-      if ((NULL == major) ||
+-          ((http_version + i == major + 1) && ('0' == *major)) )
+-      {
+-        major = http_version + i;
+-      }
+-      ++i;
+-    }
+-    else if ('.' == http_version[i])
+-    {
+-      dot = http_version + i;
+-      ++i;
+-      break;
+-    }
+-    else
+-    {
+-      return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-    }
+-  }
+-  const char *minor = NULL;
+-  const char *end   = NULL;
+-  for (;;)
+-  {
+-    char c = http_version[i];
+-    if (('0' <= c) && ('9' >= c))
+-    {
+-      if ((NULL == minor) ||
+-          ((http_version + i == minor + 1) && ('0' == *minor)) )
+-      {
+-        minor = http_version + i;
+-      }
+-      ++i;
+-    }
+-    else if (0 == c)
+-    {
+-      end = http_version + i;
+-      break;
+-    }
+-    else
+-    {
+-      return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-    }
+-  }
+-  if ((NULL == major) || (NULL == dot) || (NULL == minor) || (NULL == end))
+-  {
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-  if ((2 <= dot - major) || ('2' <= *major) ||
+-      (('1' == *major) && ((2 <= end - minor) || ('1' <= *minor))) )
+-  {
+-    return MHD_WEBSOCKET_STATUS_OK;
+-  }
+-
+-  return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-}
+-
+-
+-/**
+- * Checks whether the "Connection" request header has the 'Upgrade' token.
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_check_connection_header (const char *connection_header)
+-{
+-  /* validate parameters */
+-  if (NULL == connection_header)
+-  {
+-    /* To be compatible with the return value */
+-    /* of MHD_lookup_connection_value, */
+-    /* NULL is threated as "value not given" and not as parameter error */
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-
+-  /* Check whether the Connection includes an Upgrade token */
+-  /* RFC 7230 6.1: Multiple tokens may appear. */
+-  /* RFC 7230 3.2.6: Tokens are comma separated */
+-  const char *token_start = NULL;
+-  const char *token_end   = NULL;
+-  for (size_t i = 0; ; ++i)
+-  {
+-    char c = connection_header[i];
+-
+-    /* RFC 7230 3.2.6: The list of allowed characters is a token is: */
+-    /* "!" / "#" / "$" / "%" / "&" / "'" / "*" / */
+-    /* "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" */
+-    /* DIGIT / ALPHA */
+-    if (('!' == c) || ('#' == c) || ('$' == c) || ('%' == c) ||
+-        ('&' == c) || ('\'' == c) || ('*' == c) ||
+-        ('+' == c) || ('-' == c) || ('.' == c) || ('^' == c) ||
+-        ('_' == c) || ('`' == c) || ('|' == c) || ('~' == c) ||
+-        (('0' <= c) && ('9' >= c)) ||
+-        (('A' <= c) && ('Z' >= c)) || (('a' <= c) && ('z' >= c)) )
+-    {
+-      /* This is a valid token character */
+-      if (NULL == token_start)
+-      {
+-        token_start = connection_header + i;
+-      }
+-      token_end = connection_header + i + 1;
+-    }
+-    else if ((' ' == c) || ('\t' == c))
+-    {
+-      /* White-spaces around tokens will be ignored */
+-    }
+-    else if ((',' == c) || (0 == c))
+-    {
+-      /* Check the token (case-insensitive) */
+-      if (NULL != token_start)
+-      {
+-        if (7 == (token_end - token_start) )
+-        {
+-          if ( (('U' == token_start[0]) || ('u' == token_start[0])) &&
+-               (('P' == token_start[1]) || ('p' == token_start[1])) &&
+-               (('G' == token_start[2]) || ('g' == token_start[2])) &&
+-               (('R' == token_start[3]) || ('r' == token_start[3])) &&
+-               (('A' == token_start[4]) || ('a' == token_start[4])) &&
+-               (('D' == token_start[5]) || ('d' == token_start[5])) &&
+-               (('E' == token_start[6]) || ('e' == token_start[6])) )
+-          {
+-            /* The token equals to "Upgrade" */
+-            return MHD_WEBSOCKET_STATUS_OK;
+-          }
+-        }
+-      }
+-      if (0 == c)
+-      {
+-        break;
+-      }
+-      token_start = NULL;
+-      token_end   = NULL;
+-    }
+-    else
+-    {
+-      /* RFC 7230 3.2.6: Other characters are not allowed */
+-      return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-    }
+-  }
+-  return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-}
+-
+-
+-/**
+- * Checks whether the "Upgrade" request header has the "websocket" keyword.
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_check_upgrade_header (const char *upgrade_header)
+-{
+-  /* validate parameters */
+-  if (NULL == upgrade_header)
+-  {
+-    /* To be compatible with the return value */
+-    /* of MHD_lookup_connection_value, */
+-    /* NULL is threated as "value not given" and not as parameter error */
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-
+-  /* Check whether the Connection includes an Upgrade token */
+-  /* RFC 7230 6.1: Multiple tokens may appear. */
+-  /* RFC 7230 3.2.6: Tokens are comma separated */
+-  const char *keyword_start = NULL;
+-  const char *keyword_end   = NULL;
+-  for (size_t i = 0; ; ++i)
+-  {
+-    char c = upgrade_header[i];
+-
+-    /* RFC 7230 3.2.6: The list of allowed characters is a token is: */
+-    /* "!" / "#" / "$" / "%" / "&" / "'" / "*" / */
+-    /* "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" */
+-    /* DIGIT / ALPHA */
+-    /* We also allow "/" here as the sub-delimiter for the protocol version */
+-    if (('!' == c) || ('#' == c) || ('$' == c) || ('%' == c) ||
+-        ('&' == c) || ('\'' == c) || ('*' == c) ||
+-        ('+' == c) || ('-' == c) || ('.' == c) || ('^' == c) ||
+-        ('_' == c) || ('`' == c) || ('|' == c) || ('~' == c) ||
+-        ('/' == c) ||
+-        (('0' <= c) && ('9' >= c)) ||
+-        (('A' <= c) && ('Z' >= c)) || (('a' <= c) && ('z' >= c)) )
+-    {
+-      /* This is a valid token character */
+-      if (NULL == keyword_start)
+-      {
+-        keyword_start = upgrade_header + i;
+-      }
+-      keyword_end = upgrade_header + i + 1;
+-    }
+-    else if ((' ' == c) || ('\t' == c))
+-    {
+-      /* White-spaces around tokens will be ignored */
+-    }
+-    else if ((',' == c) || (0 == c))
+-    {
+-      /* Check the token (case-insensitive) */
+-      if (NULL != keyword_start)
+-      {
+-        if (9 == (keyword_end - keyword_start) )
+-        {
+-          if ( (('W' == keyword_start[0]) || ('w' == keyword_start[0])) &&
+-               (('E' == keyword_start[1]) || ('e' == keyword_start[1])) &&
+-               (('B' == keyword_start[2]) || ('b' == keyword_start[2])) &&
+-               (('S' == keyword_start[3]) || ('s' == keyword_start[3])) &&
+-               (('O' == keyword_start[4]) || ('o' == keyword_start[4])) &&
+-               (('C' == keyword_start[5]) || ('c' == keyword_start[5])) &&
+-               (('K' == keyword_start[6]) || ('k' == keyword_start[6])) &&
+-               (('E' == keyword_start[7]) || ('e' == keyword_start[7])) &&
+-               (('T' == keyword_start[8]) || ('t' == keyword_start[8])) )
+-          {
+-            /* The keyword equals to "websocket" */
+-            return MHD_WEBSOCKET_STATUS_OK;
+-          }
+-        }
+-      }
+-      if (0 == c)
+-      {
+-        break;
+-      }
+-      keyword_start = NULL;
+-      keyword_end   = NULL;
+-    }
+-    else
+-    {
+-      /* RFC 7230 3.2.6: Other characters are not allowed */
+-      return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-    }
+-  }
+-  return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-}
+-
+-
+-/**
+- * Checks whether the "Sec-WebSocket-Version" request header
+- * equals to "13"
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_check_version_header (const char *version_header)
+-{
+-  /* validate parameters */
+-  if (NULL == version_header)
+-  {
+-    /* To be compatible with the return value */
+-    /* of MHD_lookup_connection_value, */
+-    /* NULL is threated as "value not given" and not as parameter error */
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-
+-  if (('1' == version_header[0]) &&
+-      ('3' == version_header[1]) &&
+-      (0   == version_header[2]))
+-  {
+-    /* The version equals to "13" */
+-    return MHD_WEBSOCKET_STATUS_OK;
+-  }
+-  return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-}
+-
+-
+-/**
+- * Creates the response for the Sec-WebSocket-Accept header
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_create_accept_header (const char *sec_websocket_key,
+-                                    char *sec_websocket_accept)
+-{
+-  /* initialize output variables for errors cases */
+-  if (NULL != sec_websocket_accept)
+-    *sec_websocket_accept = 0;
+-
+-  /* validate parameters */
+-  if (NULL == sec_websocket_accept)
+-  {
+-    return MHD_WEBSOCKET_STATUS_PARAMETER_ERROR;
+-  }
+-  if (NULL == sec_websocket_key)
+-  {
+-    /* NULL is not a parameter error, */
+-    /* because MHD_lookup_connection_value returns NULL */
+-    /* if the header wasn't found */
+-    return MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER;
+-  }
+-
+-  /* build SHA1 hash of the given key and the UUID appended */
+-  char sha1[20];
+-  const char *suffix = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
+-  int length = (int) strlen (sec_websocket_key);
+-  struct sha1_ctx ctx;
+-  MHD_SHA1_init (&ctx);
+-  MHD_SHA1_update (&ctx, (const uint8_t *) sec_websocket_key, length);
+-  MHD_SHA1_update (&ctx, (const uint8_t *) suffix, 36);
+-  MHD_SHA1_finish (&ctx, (uint8_t *) sha1);
+-
+-  /* base64 encode that SHA1 hash */
+-  /* (simple algorithm here; SHA1 has always 20 bytes, */
+-  /* which will always result in a 28 bytes base64 hash) */
+-  const char *base64_encoding_table =
+-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+-  for (int i = 0, j = 0; i < 20;)
+-  {
+-    uint32_t octet_a = i < 20 ? (unsigned char) sha1[i++] : 0;
+-    uint32_t octet_b = i < 20 ? (unsigned char) sha1[i++] : 0;
+-    uint32_t octet_c = i < 20 ? (unsigned char) sha1[i++] : 0;
+-    uint32_t triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c;
+-
+-    sec_websocket_accept[j++] = base64_encoding_table[(triple >> 3 * 6) & 0x3F];
+-    sec_websocket_accept[j++] = base64_encoding_table[(triple >> 2 * 6) & 0x3F];
+-    sec_websocket_accept[j++] = base64_encoding_table[(triple >> 1 * 6) & 0x3F];
+-    sec_websocket_accept[j++] = base64_encoding_table[(triple >> 0 * 6) & 0x3F];
+-
+-  }
+-  sec_websocket_accept[27] = '=';
+-  sec_websocket_accept[28] = 0;
+-
+-  return MHD_WEBSOCKET_STATUS_OK;
+-}
+-
+-
+-/**
+- * Initializes a new websocket stream
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_stream_init (struct MHD_WebSocketStream **ws,
+-                           int flags,
+-                           size_t max_payload_size)
+-{
+-  return MHD_websocket_stream_init2 (ws,
+-                                     flags,
+-                                     max_payload_size,
+-                                     malloc,
+-                                     realloc,
+-                                     free,
+-                                     NULL,
+-                                     NULL);
+-}
+-
+-
+-/**
+- * Initializes a new websocket stream with
+- * additional parameters for allocation functions
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_stream_init2 (struct MHD_WebSocketStream **ws,
+-                            int flags,
+-                            size_t max_payload_size,
+-                            MHD_WebSocketMallocCallback callback_malloc,
+-                            MHD_WebSocketReallocCallback callback_realloc,
+-                            MHD_WebSocketFreeCallback callback_free,
+-                            void *cls_rng,
+-                            MHD_WebSocketRandomNumberGenerator callback_rng)
+-{
+-  /* initialize output variables for errors cases */
+-  if (NULL != ws)
+-    *ws = NULL;
+-
+-  /* validate parameters */
+-  if ((NULL == ws) ||
+-      (0 != (flags & ~MHD_WEBSOCKET_FLAG_MASK_ALL)) ||
+-      ((uint64_t) 0x7FFFFFFFFFFFFFFF < max_payload_size) ||
+-      (NULL == callback_malloc) ||
+-      (NULL == callback_realloc) ||
+-      (NULL == callback_free) ||
+-      ((0 != (flags & MHD_WEBSOCKET_FLAG_CLIENT)) &&
+-       (NULL == callback_rng)))
+-  {
+-    return MHD_WEBSOCKET_STATUS_PARAMETER_ERROR;
+-  }
+-
+-  /* allocate stream */
+-  struct MHD_WebSocketStream *ws_ = (struct MHD_WebSocketStream *) malloc (
+-    sizeof (struct MHD_WebSocketStream));
+-  if (NULL == ws_)
+-    return MHD_WEBSOCKET_STATUS_MEMORY_ERROR;
+-
+-  /* initialize stream */
+-  memset (ws_, 0, sizeof (struct MHD_WebSocketStream));
+-  ws_->flags   = flags;
+-  ws_->max_payload_size = max_payload_size;
+-  ws_->malloc   = callback_malloc;
+-  ws_->realloc  = callback_realloc;
+-  ws_->free     = callback_free;
+-  ws_->cls_rng  = cls_rng;
+-  ws_->rng      = callback_rng;
+-  ws_->validity = MHD_WEBSOCKET_VALIDITY_VALID;
+-
+-  /* return stream */
+-  *ws = ws_;
+-
+-  return MHD_WEBSOCKET_STATUS_OK;
+-}
+-
+-
+-/**
+- * Frees a previously allocated websocket stream
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_stream_free (struct MHD_WebSocketStream *ws)
+-{
+-  /* validate parameters */
+-  if (NULL == ws)
+-    return MHD_WEBSOCKET_STATUS_PARAMETER_ERROR;
+-
+-  /* free allocated payload data */
+-  if (ws->data_payload)
+-    ws->free (ws->data_payload);
+-  if (ws->control_payload)
+-    ws->free (ws->control_payload);
+-
+-  /* free the stream */
+-  free (ws);
+-
+-  return MHD_WEBSOCKET_STATUS_OK;
+-}
+-
+-
+-/**
+- * Invalidates a websocket stream (no more decoding possible)
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_stream_invalidate (struct MHD_WebSocketStream *ws)
+-{
+-  /* validate parameters */
+-  if (NULL == ws)
+-    return MHD_WEBSOCKET_STATUS_PARAMETER_ERROR;
+-
+-  /* invalidate stream */
+-  ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-
+-  return MHD_WEBSOCKET_STATUS_OK;
+-}
+-
+-
+-/**
+- * Returns whether a websocket stream is valid
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_VALIDITY
+-MHD_websocket_stream_is_valid (struct MHD_WebSocketStream *ws)
+-{
+-  /* validate parameters */
+-  if (NULL == ws)
+-    return MHD_WEBSOCKET_VALIDITY_INVALID;
+-
+-  return ws->validity;
+-}
+-
+-
+-/**
+- * Decodes incoming data to a websocket frame
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_decode (struct MHD_WebSocketStream *ws,
+-                      const char *streambuf,
+-                      size_t streambuf_len,
+-                      size_t *streambuf_read_len,
+-                      char **payload,
+-                      size_t *payload_len)
+-{
+-  /* initialize output variables for errors cases */
+-  if (NULL != streambuf_read_len)
+-    *streambuf_read_len = 0;
+-  if (NULL != payload)
+-    *payload = NULL;
+-  if (NULL != payload_len)
+-    *payload_len = 0;
+-
+-  /* validate parameters */
+-  if ((NULL == ws) ||
+-      ((NULL == streambuf) && (0 != streambuf_len)) ||
+-      (NULL == streambuf_read_len) ||
+-      (NULL == payload) ||
+-      (NULL == payload_len) )
+-  {
+-    return MHD_WEBSOCKET_STATUS_PARAMETER_ERROR;
+-  }
+-
+-  /* validate stream validity */
+-  if (MHD_WEBSOCKET_VALIDITY_INVALID == ws->validity)
+-    return MHD_WEBSOCKET_STATUS_STREAM_BROKEN;
+-
+-  /* decode loop */
+-  size_t current = 0;
+-  while (current < streambuf_len)
+-  {
+-    switch (ws->decode_step)
+-    {
+-    /* start of frame */
+-    case MHD_WebSocket_DecodeStep_Start:
+-      {
+-        /* The first byte contains the opcode, the fin flag and three reserved bits */
+-        if (MHD_WEBSOCKET_VALIDITY_INVALID != ws->validity)
+-        {
+-          char opcode = streambuf [current];
+-          if (0 != (opcode & 0x70))
+-          {
+-            /* RFC 6455 5.2 RSV1-3: If a reserved flag is set */
+-            /* (while it isn't specified by an extension) the communication must fail. */
+-            ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-            if (0 != (ws->flags
+-                      & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-            {
+-              MHD_websocket_encode_close (ws,
+-                                          MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                          0,
+-                                          0,
+-                                          payload,
+-                                          payload_len);
+-            }
+-            *streambuf_read_len = current;
+-            return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-          }
+-          switch (opcode & 0x0F)
+-          {
+-          case MHD_WebSocket_Opcode_Continuation:
+-            if (0 == ws->data_type)
+-            {
+-              /* RFC 6455 5.4: Continuation frame without previous data frame */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-            if (MHD_WEBSOCKET_VALIDITY_ONLY_VALID_FOR_CONTROL_FRAMES ==
+-                ws->validity)
+-            {
+-              /* RFC 6455 5.5.1: After a close frame has been sent, */
+-              /* no data frames may be sent (so we don't accept data frames */
+-              /* for decoding anymore) */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-            break;
+-
+-          case MHD_WebSocket_Opcode_Text:
+-          case MHD_WebSocket_Opcode_Binary:
+-            if (0 != ws->data_type)
+-            {
+-              /* RFC 6455 5.4: Continuation expected, but new data frame */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-            if (MHD_WEBSOCKET_VALIDITY_ONLY_VALID_FOR_CONTROL_FRAMES ==
+-                ws->validity)
+-            {
+-              /* RFC 6455 5.5.1: After a close frame has been sent, */
+-              /* no data frames may be sent (so we don't accept data frames */
+-              /* for decoding anymore) */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-            break;
+-
+-          case MHD_WebSocket_Opcode_Close:
+-          case MHD_WebSocket_Opcode_Ping:
+-          case MHD_WebSocket_Opcode_Pong:
+-            if ((opcode & 0x80) == 0)
+-            {
+-              /* RFC 6455 5.4: Control frames may not be fragmented */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-            if (MHD_WebSocket_Opcode_Close == (opcode & 0x0F))
+-            {
+-              /* RFC 6455 5.5.1: After a close frame has been sent, */
+-              /* no data frames may be sent (so we don't accept data frames */
+-              /* for decoding anymore) */
+-              ws->validity =
+-                MHD_WEBSOCKET_VALIDITY_ONLY_VALID_FOR_CONTROL_FRAMES;
+-            }
+-            break;
+-
+-          default:
+-            /* RFC 6455 5.2 OPCODE: Only six opcodes are specified. */
+-            /* All other are invalid in version 13 of the protocol. */
+-            ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-            if (0 != (ws->flags
+-                      & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-            {
+-              MHD_websocket_encode_close (ws,
+-                                          MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                          0,
+-                                          0,
+-                                          payload,
+-                                          payload_len);
+-            }
+-            *streambuf_read_len = current;
+-            return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-          }
+-        }
+-        ws->frame_header [ws->frame_header_size++] = streambuf [current++];
+-        ws->decode_step = MHD_WebSocket_DecodeStep_Length1ofX;
+-      }
+-      break;
+-
+-    case MHD_WebSocket_DecodeStep_Length1ofX:
+-      {
+-        /* The second byte specifies whether the data is masked and the size */
+-        /* (the client MUST mask the payload, the server MUST NOT mask the payload) */
+-        char frame_len = streambuf [current];
+-        char is_masked = (frame_len & 0x80);
+-        frame_len &= 0x7f;
+-        if (MHD_WEBSOCKET_VALIDITY_INVALID != ws->validity)
+-        {
+-          if (0 != is_masked)
+-          {
+-            if (MHD_WEBSOCKET_FLAG_CLIENT == (ws->flags
+-                                              & MHD_WEBSOCKET_FLAG_CLIENT))
+-            {
+-              /* RFC 6455 5.1: All frames from the server must be unmasked */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-          }
+-          else
+-          {
+-            if (MHD_WEBSOCKET_FLAG_SERVER == (ws->flags
+-                                              & MHD_WEBSOCKET_FLAG_CLIENT))
+-            {
+-              /* RFC 6455 5.1: All frames from the client must be masked */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-          }
+-          if (126 <= frame_len)
+-          {
+-            if (0 != (ws->frame_header [0] & 0x08))
+-            {
+-              /* RFC 6455 5.5: Control frames may not have more payload than 125 bytes */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-          }
+-          if (1 == frame_len)
+-          {
+-            if (MHD_WebSocket_Opcode_Close == (ws->frame_header [0] & 0x0F))
+-            {
+-              /* RFC 6455 5.5.1: The close frame must have at least */
+-              /* two bytes of payload if payload is used */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current;
+-              return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-            }
+-          }
+-        }
+-        ws->frame_header [ws->frame_header_size++] = streambuf [current++];
+-
+-        if (126 == frame_len)
+-        {
+-          ws->decode_step = MHD_WebSocket_DecodeStep_Length1of2;
+-        }
+-        else if (127 == frame_len)
+-        {
+-          ws->decode_step = MHD_WebSocket_DecodeStep_Length1of8;
+-        }
+-        else
+-        {
+-          size_t size = (size_t) frame_len;
+-          if ((SIZE_MAX < size) ||
+-              (ws->max_payload_size && (ws->max_payload_size < size)) )
+-          {
+-            /* RFC 6455 7.4.1 1009: If the message is too big to process, we may close the connection */
+-            ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-            if (0 != (ws->flags
+-                      & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-            {
+-              MHD_websocket_encode_close (ws,
+-                                          MHD_WEBSOCKET_CLOSEREASON_MAXIMUM_ALLOWED_PAYLOAD_SIZE_EXCEEDED,
+-                                          0,
+-                                          0,
+-                                          payload,
+-                                          payload_len);
+-            }
+-            *streambuf_read_len = current;
+-            return MHD_WEBSOCKET_STATUS_MAXIMUM_SIZE_EXCEEDED;
+-          }
+-          ws->payload_size = size;
+-          if (0 != is_masked)
+-          {
+-            /* with mask */
+-            ws->decode_step = MHD_WebSocket_DecodeStep_Mask1Of4;
+-          }
+-          else
+-          {
+-            /* without mask */
+-            *((uint32_t *) ws->mask_key) = 0;
+-            ws->decode_step = MHD_WebSocket_DecodeStep_HeaderCompleted;
+-          }
+-        }
+-      }
+-      break;
+-
+-    /* Payload size first byte of 2 bytes */
+-    case MHD_WebSocket_DecodeStep_Length1of2:
+-    /* Payload size first 7 bytes of 8 bytes */
+-    case MHD_WebSocket_DecodeStep_Length1of8:
+-    case MHD_WebSocket_DecodeStep_Length2of8:
+-    case MHD_WebSocket_DecodeStep_Length3of8:
+-    case MHD_WebSocket_DecodeStep_Length4of8:
+-    case MHD_WebSocket_DecodeStep_Length5of8:
+-    case MHD_WebSocket_DecodeStep_Length6of8:
+-    case MHD_WebSocket_DecodeStep_Length7of8:
+-    /* Mask first 3 bytes of 4 bytes */
+-    case MHD_WebSocket_DecodeStep_Mask1Of4:
+-    case MHD_WebSocket_DecodeStep_Mask2Of4:
+-    case MHD_WebSocket_DecodeStep_Mask3Of4:
+-      ws->frame_header [ws->frame_header_size++] = streambuf [current++];
+-      ++ws->decode_step;
+-      break;
+-
+-    /* 2 byte length finished */
+-    case MHD_WebSocket_DecodeStep_Length2of2:
+-      {
+-        ws->frame_header [ws->frame_header_size++] = streambuf [current++];
+-        size_t size = (size_t) MHD_htons (
+-          *((uint16_t *) &ws->frame_header [2]));
+-        if (125 >= size)
+-        {
+-          /* RFC 6455 5.2 Payload length: The minimal number of bytes */
+-          /* must be used for the length */
+-          ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-          if (0 != (ws->flags
+-                    & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-          {
+-            MHD_websocket_encode_close (ws,
+-                                        MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                        0,
+-                                        0,
+-                                        payload,
+-                                        payload_len);
+-          }
+-          *streambuf_read_len = current;
+-          return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-        }
+-        if ((SIZE_MAX < size) ||
+-            (ws->max_payload_size && (ws->max_payload_size < size)) )
+-        {
+-          /* RFC 6455 7.4.1 1009: If the message is too big to process, */
+-          /* we may close the connection */
+-          ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-          if (0 != (ws->flags
+-                    & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-          {
+-            MHD_websocket_encode_close (ws,
+-                                        MHD_WEBSOCKET_CLOSEREASON_MAXIMUM_ALLOWED_PAYLOAD_SIZE_EXCEEDED,
+-                                        0,
+-                                        0,
+-                                        payload,
+-                                        payload_len);
+-          }
+-          *streambuf_read_len = current;
+-          return MHD_WEBSOCKET_STATUS_MAXIMUM_SIZE_EXCEEDED;
+-        }
+-        ws->payload_size = size;
+-        if (0 != (ws->frame_header [1] & 0x80))
+-        {
+-          /* with mask */
+-          ws->decode_step = MHD_WebSocket_DecodeStep_Mask1Of4;
+-        }
+-        else
+-        {
+-          /* without mask */
+-          *((uint32_t *) ws->mask_key) = 0;
+-          ws->decode_step = MHD_WebSocket_DecodeStep_HeaderCompleted;
+-        }
+-      }
+-      break;
+-
+-    /* 8 byte length finished */
+-    case MHD_WebSocket_DecodeStep_Length8of8:
+-      {
+-        ws->frame_header [ws->frame_header_size++] = streambuf [current++];
+-        uint64_t size = MHD_htonll (*((uint64_t *) &ws->frame_header [2]));
+-        if (0x7fffffffffffffff < size)
+-        {
+-          /* RFC 6455 5.2 frame-payload-length-63: The length may */
+-          /* not exceed 0x7fffffffffffffff */
+-          ws->decode_step = MHD_WebSocket_DecodeStep_BrokenStream;
+-          ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-          if (0 != (ws->flags
+-                    & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-          {
+-            MHD_websocket_encode_close (ws,
+-                                        MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                        0,
+-                                        0,
+-                                        payload,
+-                                        payload_len);
+-          }
+-          *streambuf_read_len = current;
+-          return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-        }
+-        if (65535 >= size)
+-        {
+-          /* RFC 6455 5.2 Payload length: The minimal number of bytes */
+-          /* must be used for the length */
+-          ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-          if (0 != (ws->flags
+-                    & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-          {
+-            MHD_websocket_encode_close (ws,
+-                                        MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR,
+-                                        0,
+-                                        0,
+-                                        payload,
+-                                        payload_len);
+-          }
+-          *streambuf_read_len = current;
+-          return MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR;
+-        }
+-        if ((SIZE_MAX < size) ||
+-            (ws->max_payload_size && (ws->max_payload_size < size)) )
+-        {
+-          /* RFC 6455 7.4.1 1009: If the message is too big to process, */
+-          /* we may close the connection */
+-          ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-          if (0 != (ws->flags
+-                    & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-          {
+-            MHD_websocket_encode_close (ws,
+-                                        MHD_WEBSOCKET_CLOSEREASON_MAXIMUM_ALLOWED_PAYLOAD_SIZE_EXCEEDED,
+-                                        0,
+-                                        0,
+-                                        payload,
+-                                        payload_len);
+-          }
+-          *streambuf_read_len = current;
+-          return MHD_WEBSOCKET_STATUS_MAXIMUM_SIZE_EXCEEDED;
+-        }
+-        ws->payload_size = (size_t) size;
+-
+-        if (0 != (ws->frame_header [1] & 0x80))
+-        {
+-          /* with mask */
+-          ws->decode_step = MHD_WebSocket_DecodeStep_Mask1Of4;
+-        }
+-        else
+-        {
+-          /* without mask */
+-          *((uint32_t *) ws->mask_key) = 0;
+-          ws->decode_step = MHD_WebSocket_DecodeStep_HeaderCompleted;
+-        }
+-      }
+-      break;
+-
+-    /* mask finished */
+-    case MHD_WebSocket_DecodeStep_Mask4Of4:
+-      ws->frame_header [ws->frame_header_size++] = streambuf [current++];
+-      *((uint32_t *) ws->mask_key) = *((uint32_t *) &ws->frame_header [ws->
+-                                                                       frame_header_size
+-                                                                       - 4]);
+-      ws->decode_step = MHD_WebSocket_DecodeStep_HeaderCompleted;
+-      break;
+-
+-    /* header finished */
+-    case MHD_WebSocket_DecodeStep_HeaderCompleted:
+-      /* return or assign either to data or control */
+-      {
+-        int ret = MHD_websocket_decode_header_complete (ws,
+-                                                        payload,
+-                                                        payload_len);
+-        if (MHD_WEBSOCKET_STATUS_OK != ret)
+-        {
+-          *streambuf_read_len = current;
+-          return ret;
+-        }
+-      }
+-      break;
+-
+-    /* payload data */
+-    case MHD_WebSocket_DecodeStep_PayloadOfDataFrame:
+-    case MHD_WebSocket_DecodeStep_PayloadOfControlFrame:
+-      {
+-        size_t bytes_needed    = ws->payload_size - ws->payload_index;
+-        size_t bytes_remaining = streambuf_len - current;
+-        size_t bytes_to_take   = bytes_needed < bytes_remaining ? bytes_needed :
+-                                 bytes_remaining;
+-        if (0 != bytes_to_take)
+-        {
+-          size_t utf8_start     = ws->payload_index;
+-          char *decode_payload = ws->decode_step ==
+-                                 MHD_WebSocket_DecodeStep_PayloadOfDataFrame ?
+-                                 ws->data_payload_start :
+-                                 ws->control_payload;
+-
+-          /* copy the new payload data (with unmasking if necessary */
+-          MHD_websocket_copy_payload (decode_payload + ws->payload_index,
+-                                      &streambuf [current],
+-                                      bytes_to_take,
+-                                      *((uint32_t *) ws->mask_key),
+-                                      (unsigned long) (ws->payload_index
+-                                                       & 0x03));
+-          current += bytes_to_take;
+-          ws->payload_index += bytes_to_take;
+-          if (((MHD_WebSocket_DecodeStep_PayloadOfDataFrame ==
+-                ws->decode_step) &&
+-               (MHD_WebSocket_Opcode_Text == ws->data_type)) ||
+-              ((MHD_WebSocket_DecodeStep_PayloadOfControlFrame ==
+-                ws->decode_step) &&
+-               (MHD_WebSocket_Opcode_Close == (ws->frame_header [0] & 0x0f)) &&
+-               (2 < ws->payload_index)) )
+-          {
+-            /* RFC 6455 8.1: We need to check the UTF-8 validity */
+-            int utf8_step;
+-            char *decode_payload_utf8;
+-            size_t bytes_to_check;
+-            size_t utf8_error_offset = 0;
+-            if (MHD_WebSocket_DecodeStep_PayloadOfDataFrame == ws->decode_step)
+-            {
+-              utf8_step           = ws->data_utf8_step;
+-              decode_payload_utf8 = decode_payload + utf8_start;
+-              bytes_to_check      = bytes_to_take;
+-            }
+-            else
+-            {
+-              utf8_step = ws->control_utf8_step;
+-              if ((MHD_WebSocket_Opcode_Close == (ws->frame_header [0]
+-                                                  & 0x0f)) &&
+-                  (2 > utf8_start) )
+-              {
+-                /* The first two bytes of the close frame are binary content and */
+-                /* must be skipped in the UTF-8 check */
+-                utf8_start = 2;
+-                utf8_error_offset = 2;
+-              }
+-              decode_payload_utf8 = decode_payload + utf8_start;
+-              bytes_to_check      = bytes_to_take - utf8_start;
+-            }
+-            size_t utf8_check_offset = 0;
+-            int utf8_result = MHD_websocket_check_utf8 (decode_payload_utf8,
+-                                                        bytes_to_check,
+-                                                        &utf8_step,
+-                                                        &utf8_check_offset);
+-            if (MHD_WebSocket_UTF8Result_Invalid != utf8_result)
+-            {
+-              /* memorize current validity check step to continue later */
+-              ws->data_utf8_step = utf8_step;
+-            }
+-            else
+-            {
+-              /* RFC 6455 8.1: We must fail on broken UTF-8 sequence */
+-              ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-              if (0 != (ws->flags
+-                        & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-              {
+-                MHD_websocket_encode_close (ws,
+-                                            MHD_WEBSOCKET_CLOSEREASON_MALFORMED_UTF8,
+-                                            0,
+-                                            0,
+-                                            payload,
+-                                            payload_len);
+-              }
+-              *streambuf_read_len = current - bytes_to_take
+-                                    + utf8_check_offset + utf8_error_offset;
+-              return MHD_WEBSOCKET_STATUS_UTF8_ENCODING_ERROR;
+-            }
+-          }
+-        }
+-      }
+-
+-      if (ws->payload_size == ws->payload_index)
+-      {
+-        /* all payload data of the current frame has been received */
+-        int ret = MHD_websocket_decode_payload_complete (ws,
+-                                                         payload,
+-                                                         payload_len);
+-        if (MHD_WEBSOCKET_STATUS_OK != ret)
+-        {
+-          *streambuf_read_len = current;
+-          return ret;
+-        }
+-      }
+-      break;
+-
+-    case MHD_WebSocket_DecodeStep_BrokenStream:
+-      *streambuf_read_len = current;
+-      return MHD_WEBSOCKET_STATUS_STREAM_BROKEN;
+-    }
+-  }
+-
+-  /* Special treatment for zero payload length messages */
+-  if (MHD_WebSocket_DecodeStep_HeaderCompleted == ws->decode_step)
+-  {
+-    int ret = MHD_websocket_decode_header_complete (ws,
+-                                                    payload,
+-                                                    payload_len);
+-    if (MHD_WEBSOCKET_STATUS_OK != ret)
+-    {
+-      *streambuf_read_len = current;
+-      return ret;
+-    }
+-  }
+-  switch (ws->decode_step)
+-  {
+-  case MHD_WebSocket_DecodeStep_PayloadOfDataFrame:
+-  case MHD_WebSocket_DecodeStep_PayloadOfControlFrame:
+-    if (ws->payload_size == ws->payload_index)
+-    {
+-      /* all payload data of the current frame has been received */
+-      int ret = MHD_websocket_decode_payload_complete (ws,
+-                                                       payload,
+-                                                       payload_len);
+-      if (MHD_WEBSOCKET_STATUS_OK != ret)
+-      {
+-        *streambuf_read_len = current;
+-        return ret;
+-      }
+-    }
+-    break;
+-  }
+-  *streambuf_read_len = current;
+-
+-  /* more data needed */
+-  return MHD_WEBSOCKET_STATUS_OK;
+-}
+-
+-
+-static enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_decode_header_complete (struct MHD_WebSocketStream *ws,
+-                                      char **payload,
+-                                      size_t *payload_len)
+-{
+-  /* assign either to data or control */
+-  char opcode = ws->frame_header [0] & 0x0f;
+-  switch (opcode)
+-  {
+-  case MHD_WebSocket_Opcode_Continuation:
+-    {
+-      /* validate payload size */
+-      size_t new_size_total = ws->payload_size + ws->data_payload_size;
+-      if ((0 != ws->max_payload_size) && (ws->max_payload_size <
+-                                          new_size_total) )
+-      {
+-        /* RFC 6455 7.4.1 1009: If the message is too big to process, */
+-        /* we may close the connection */
+-        ws->decode_step = MHD_WebSocket_DecodeStep_BrokenStream;
+-        ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID;
+-        if (0 != (ws->flags
+-                  & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR))
+-        {
+-          MHD_websocket_encode_close (ws,
+-                                      MHD_WEBSOCKET_CLOSEREASON_MAXIMUM_ALLOWED_PAYLOAD_SIZE_EXCEEDED,
+-                                      0,
+-                                      0,
+-                                      payload,
+-                                      payload_len);
+-        }
+-        return MHD_WEBSOCKET_STATUS_MAXIMUM_SIZE_EXCEEDED;
+-      }
+-      /* allocate buffer for continued data frame */
+-      char *new_buf = NULL;
+-      if (0 != new_size_total)
+-      {
+-        new_buf = ws->realloc (ws->data_payload, new_size_total + 1);
+-        if (NULL == new_buf)
+-        {
+-          return MHD_WEBSOCKET_STATUS_MEMORY_ERROR;
+-        }
+-        new_buf [new_size_total] = 0;
+-        ws->data_payload_start = &new_buf[ws->data_payload_size];
+-      }
+-      else
+-      {
+-        ws->data_payload_start = new_buf;
+-      }
+-      ws->data_payload       = new_buf;
+-      ws->data_payload_size  = new_size_total;
+-    }
+-    ws->decode_step = MHD_WebSocket_DecodeStep_PayloadOfDataFrame;
+-    break;
+-
+-  case MHD_WebSocket_Opcode_Text:
+-  case MHD_WebSocket_Opcode_Binary:
+-    /* allocate buffer for data frame */
+-    {
+-      size_t new_size_total = ws->payload_size;
+-      char *new_buf = NULL;
+-      if (0 != new_size_total)
+-      {
+-        new_buf = ws->malloc (new_size_total + 1);
+-        if (NULL == new_buf)
+-        {
+-          return MHD_WEBSOCKET_STATUS_MEMORY_ERROR;
+-        }
+-        new_buf [new_size_total] = 0;
+-      }
+-      ws->data_payload        = new_buf;
+-      ws->data_payload_start  = new_buf;
+-      ws->data_payload_size   = new_size_total;
+-      ws->data_type           = opcode;
+-    }
+-    ws->decode_step = MHD_WebSocket_DecodeStep_PayloadOfDataFrame;
+-    break;
+-
+-  case MHD_WebSocket_Opcode_Close:
+-  case MHD_WebSocket_Opcode_Ping:
+-  case MHD_WebSocket_Opcode_Pong:
+-    /* allocate buffer for control frame */
+-    {
+-      size_t new_size_total = ws->payload_size;
+-      char *new_buf = NULL;
+-      if (0 != new_size_total)
+-      {
+-        new_buf = ws->malloc (new_size_total + 1);
+-        if (NULL == new_buf)
+-        {
+-          return MHD_WEBSOCKET_STATUS_MEMORY_ERROR;
+-        }
+-        new_buf[new_size_total] = 0;
+-      }
+-      ws->control_payload = new_buf;
+-    }
+-    ws->decode_step = MHD_WebSocket_DecodeStep_PayloadOfControlFrame;
+-    break;
+-  }
+-
+-  return MHD_WEBSOCKET_STATUS_OK;
+-}
+-
+-
+-static enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_decode_payload_complete (struct MHD_WebSocketStream *ws,
+-                                       char **payload,
+-                                       size_t *payload_len)
+-{
+-  /* all payload data of the current frame has been received */
+-  char is_continue = MHD_WebSocket_Opcode_Continuation ==
+-                     (ws->frame_header [0] & 0x0F);
+-  char is_fin      = ws->frame_header [0] & 0x80;
+-  if (0 != is_fin)
+-  {
+-    /* the frame is complete */
+-    if (MHD_WebSocket_DecodeStep_PayloadOfDataFrame == ws->decode_step)
+-    {
+-      /* data frame */
+-      char data_type = ws->data_type;
+-      if ((0 != (ws->flags & MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS)) &&
+-          (0 != is_continue))
+-      {
+-        data_type |= 0x40;   /* mark as last fragment */
+-      }
+-      *payload     = ws->data_payload;
+-      *payload_len = ws->data_payload_size;
+-      ws->data_payload       = 0;
+-      ws->data_payload_start = 0;
+-      ws->data_payload_size  = 0;
+-      ws->decode_step        = MHD_WebSocket_DecodeStep_Start;
+-      ws->payload_index      = 0;
+-      ws->data_type          = 0;
+-      ws->frame_header_size  = 0;
+-      return data_type;
+-    }
+-    else
+-    {
+-      /* control frame */
+-      *payload     = ws->control_payload;
+-      *payload_len = ws->payload_size;
+-      ws->control_payload   = 0;
+-      ws->decode_step       = MHD_WebSocket_DecodeStep_Start;
+-      ws->payload_index     = 0;
+-      ws->frame_header_size = 0;
+-      return (ws->frame_header [0] & 0x0f);
+-    }
+-  }
+-  else if (0 != (ws->flags & MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS))
+-  {
+-    /* RFC 6455 5.4: To allow streaming, the user can choose */
+-    /* to return fragments */
+-    if ((MHD_WebSocket_Opcode_Text == ws->data_type) &&
+-        (MHD_WEBSOCKET_UTF8STEP_NORMAL != ws->data_utf8_step) )
+-    {
+-      /* the last UTF-8 sequence is incomplete, so we keep the start of
+-      that and only return the part before */
+-      size_t given_utf8 = 0;
+-      switch (ws->data_utf8_step)
+-      {
+-      /* one byte given */
+-      case MHD_WEBSOCKET_UTF8STEP_UTF2TAIL_1OF1:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF3TAIL1_1OF2:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF3TAIL2_1OF2:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF3TAIL_1OF2:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF4TAIL1_1OF3:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF4TAIL2_1OF3:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF4TAIL_1OF3:
+-        given_utf8 = 1;
+-        break;
+-      /* two bytes given */
+-      case MHD_WEBSOCKET_UTF8STEP_UTF3TAIL_2OF2:
+-      case MHD_WEBSOCKET_UTF8STEP_UTF4TAIL_2OF3:
+-        given_utf8 = 2;
+-        break;
+-      /* three bytes given */
+-      case MHD_WEBSOCKET_UTF8STEP_UTF4TAIL_3OF3:
+-        given_utf8 = 3;
+-        break;
+-      }
+-      size_t new_len = ws->data_payload_size - given_utf8;
+-      if (0 != new_len)
+-      {
+-        char *next_payload = ws->malloc (given_utf8 + 1);
+-        if (NULL == next_payload)
+-        {
+-          return MHD_WEBSOCKET_STATUS_MEMORY_ERROR;
+-        }
+-        memcpy (next_payload,
+-                ws->data_payload_start + ws->payload_index - given_utf8,
+-                given_utf8);
+-        next_payload[given_utf8] = 0;
+-
+-        ws->data_payload[new_len] = 0;
+-        *payload     = ws->data_payload;
+-        *payload_len = new_len;
+-        ws->data_payload      = next_payload;
+-        ws->data_payload_size = given_utf8;
+-      }
+-      else
+-      {
+-        *payload     = NULL;
+-        *payload_len = 0;
+-      }
+-      ws->decode_step       = MHD_WebSocket_DecodeStep_Start;
+-      ws->payload_index     = 0;
+-      ws->frame_header_size = 0;
+-      if (0 != is_continue)
+-        return ws->data_type | 0x20;    /* mark as middle fragment */
+-      else
+-        return ws->data_type | 0x10;    /* mark as first fragment */
+-    }
+-    else
+-    {
+-      /* we simply pass the entire data frame */
+-      *payload     = ws->data_payload;
+-      *payload_len = ws->data_payload_size;
+-      ws->data_payload       = 0;
+-      ws->data_payload_start = 0;
+-      ws->data_payload_size  = 0;
+-      ws->decode_step        = MHD_WebSocket_DecodeStep_Start;
+-      ws->payload_index      = 0;
+-      ws->frame_header_size  = 0;
+-      if (0 != is_continue)
+-        return ws->data_type | 0x20;    /* mark as middle fragment */
+-      else
+-        return ws->data_type | 0x10;    /* mark as first fragment */
+-    }
+-  }
+-  else
+-  {
+-    /* RFC 6455 5.4: We must await a continuation frame to get */
+-    /* the remainder of this data frame */
+-    ws->decode_step       = MHD_WebSocket_DecodeStep_Start;
+-    ws->frame_header_size = 0;
+-    ws->payload_index     = 0;
+-    return MHD_WEBSOCKET_STATUS_OK;
+-  }
+-}
+-
+-
+-/**
+- * Splits the received close reason
+- */
+-_MHD_EXTERN enum MHD_WEBSOCKET_STATUS
+-MHD_websocket_split_close_reason (const char *payload,
+-                                  size_t payload_len,
+-                                  unsigned short *reason_code,
+-                                  const char **reason_utf8,
+-                                  size_t *reason_utf8_len)
+-{
+-  /* initialize output variables for errors cases */
+-  if (NULL != reason_code)
+-    *reason_code = MHD_WEBSOCKET_CLOSEREASON_NO_REASON;
+-  if (NULL != reason_utf8)
+-    *reason_utf8 = NULL;
+-  if (NULL != reason_utf8_len)
+-    *reason_utf8_len = 0;
+-
+-  /* validate parameters */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

meta/recipes-support/libmicrohttpd/libmicrohttpd_1.0.2.bb +2 -1
index a75a5b3be8..fdca510d0b 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.