diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | src/BWebSocket.cc | 2 |
2 files changed, 10 insertions, 2 deletions
@@ -8,7 +8,7 @@ CPPFLAGS += -g3 -gdwarf-2 -DDEBUG -DEV_VERIFY=3 LDFLAGS += -g3 -gdwarf-2 endif -INCLUDES = includes libcoro libev LuaJIT/src lcrypt libtommath libtomcrypt/src/headers +INCLUDES = includes libcoro libev LuaJIT/src lcrypt libtommath libtomcrypt/src/headers src/jsoncpp/include LIBS = z DEFINES = _LARGEFILE64_SOURCE LITTLE_ENDIAN LTM_DESC LTC_SOURCE USE_LTM @@ -28,6 +28,7 @@ CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) $(addprefix -D, $(DEFINES)) LDFLAGS += $(ARCH_FLAGS) LDLIBS = $(addprefix -l, $(LIBS)) +vpath %.cpp src/jsoncpp/src vpath %.cc src:tests vpath %.c libcoro:libev:win32/pthreads-win32:win32/iconv:win32/regex:lcrypt @@ -65,6 +66,10 @@ HttpServer.cc \ SimpleMustache.cc \ BWebSocket.cc \ \ +json_reader.cpp \ +json_writer.cpp \ +json_value.cpp \ +\ SHA1.cc \ Base64.cc \ \ @@ -176,6 +181,9 @@ dep: $(ALL_DEPS) %.dep : %.cc $(CXX) $(CXXFLAGS) $(CPPFLAGS_NO_ARCH) -M $< > $@ +%.dep : %.cpp + $(CXX) $(CXXFLAGS) $(CPPFLAGS_NO_ARCH) -M $< > $@ + %.dep : %.c $(CC) $(CFLAGS) $(CPPFLAGS_NO_ARCH) -M $< > $@ diff --git a/src/BWebSocket.cc b/src/BWebSocket.cc index 013f1e0..3dded95 100644 --- a/src/BWebSocket.cc +++ b/src/BWebSocket.cc @@ -253,7 +253,7 @@ bool Balau::WebSocketServerBase::Do(HttpServer * server, Http::Request & req, Ht if (!req.upgrade) goto error; - if (req.headers["Upgrade"] != "websocket") goto error; + if (req.headers["Upgrade"].lower() != "websocket") goto error; if (req.headers["Sec-WebSocket-Key"] == "") goto error; |