Andy Green [Sat, 9 Nov 2013 02:09:09 +0000 (10:09 +0800)]
improve minilex use external parsing header
Clean up minilex
Move the header output to stdout
Introduce lexfile.h as the header output
Use lexfile.h in both minilex itself and lws
Add the following header support
"Accept:",
"If-Modified-Since:",
"Accept-Encoding:",
"Accept-Language:",
"Pragma:",
"Cache-Control:",
"Authorization:",
"Cookie:",
"Content-Type:",
"Date:",
"Range:",
"Referer:"
Signed-off-by: Andy Green <andy.green@linaro.org>
Graham Newton [Sat, 9 Nov 2013 00:11:41 +0000 (08:11 +0800)]
windows workaround unsigned fd in emulated poll
A common practise to temporarily disable a socket in a poll call is to negate the socket fd. poll should then ignore the socket.
emulated_poll does this with the following code:
if (poll_fd->fd < 0 || !poll_fd->events)
goto skip1;
However on Windows the fd field in WSAPOLLFD is unsigned int!!! So the check for a negative fd value always fails.
This results in select returning an error with an error code of 10038 -- Socket operation on nonsocket.
The fix is to type cast fd like so:
if ((int)poll_fd->fd < 0 || !poll_fd->events)
This may be the cause of some high CPU load reports. I noticed the load being 50% with my application running on Windows XP.
Signed-off-by: Graham Newton <gnewton@peavey-eu.com>
Andy Green [Sat, 9 Nov 2013 00:07:38 +0000 (08:07 +0800)]
interface improve visibility fail if not found
Signed-off-by: Andy Green <andy.green@linaro.org>
Andreas Pakulat [Mon, 28 Oct 2013 14:00:16 +0000 (15:00 +0100)]
Windows Fix usage in Windows XP targetting projects
This is important since this stuff is in publicly included headers
and even though the usage of the WSAPoll API is a runtime decision
the public headers may be used in code that needs to build with
_WIN32_WINNT=0x0501 to support WinXP.
When building a project using libwebsockets with that define set
to 0x0501 winsock.h will not define the WSAPOLLFD struct causing that
project to fail to compile.
Andy Green [Mon, 4 Nov 2013 02:17:50 +0000 (10:17 +0800)]
unixify websock w32.h line endings
Signed-off-by: Andy Green <andy.green@linaro.org>
Andreas Pakulat [Wed, 16 Oct 2013 15:57:17 +0000 (17:57 +0200)]
Windows Fix include for win32helpers
The installed headers are all in the same directory, so no relative
path possible there. The cmake files already add the win32helpers
directory to the include paths, so this builds just fine.
Andreas Pakulat [Mon, 28 Oct 2013 15:02:12 +0000 (16:02 +0100)]
Windows Fix installing the dll
Without a runtime install directory, cmake won't install the dll at
all. Only the import library was installed. So fix that.
Andreas Pakulat [Mon, 28 Oct 2013 14:18:04 +0000 (15:18 +0100)]
Support _WIN32 in addition to WIN32 define
MSVC8 and MSVC9 set only _WIN32, so support that define as well to be able
to compile libwebsockets with those compilers.
Andreas Pakulat [Mon, 28 Oct 2013 14:15:44 +0000 (15:15 +0100)]
Drop wsockcompat.h header its not part of msvc
I don't see a wsockcompat.h anywhere in MSVC9 or MSVC8 and their
corresponding sdk's. It does not seem like this is a standard windows
header, so better drop that and add the compat-defines to the same
place that already has other WSA compat defines.
Graham Newton [Mon, 4 Nov 2013 01:47:06 +0000 (09:47 +0800)]
handle HUP on any mode socket
I am using libwebsockets on Windows 7 in external poll mode.
I am finding that if I present a socket fd on a normal HTTP connection
(LWS_CONNMODE_HTTP_SERVING:) to libwebsocket_service_fd with just a HUP
event, the event doesn't get handled but revents gets cleared indicating
that the event has been handled. Should it be handled in the same way
as LWS_CONNMODE_WS_SERVING?
(Modified by AG to apply to all sockets)
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Graham Newton <gnewton@peavey-eu.com>
Andy Green [Sat, 26 Oct 2013 13:18:44 +0000 (21:18 +0800)]
trac41 WIN32 add wsockcompat.h
Using Windows 7 64 bit, cloned repo on
20130926. Using Qt creator and Microsoft Visual C++ Compiler 9.0 (x86).
Result (errors from compile output): D:\Projects\CDPStudioAPI\libwebsockets_orig\lib\client-handshake.c:87: error: C2065: 'EALREADY' : undeclared identifier
D:\Projects\CDPStudioAPI\libwebsockets_orig\lib\client-handshake.c:87: error: C2065: 'EINPROGRESS' : undeclared identifier
Possible solution is to use wsockcompat.h (compatibility header for using EALREADY, EINPROGRESS etc in older versions of Windows SDK). Compiled fine when I #included wsockcompat.h into client-handshake.c
Reported-by: mart22n via Trac 41
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 26 Oct 2013 12:36:08 +0000 (20:36 +0800)]
v1.2.3 changelog update
Signed-off-by: Andy Green <andy.green@linaro.org>
Markus Elfring [Sat, 26 Oct 2013 12:23:00 +0000 (20:23 +0800)]
make header protection unique remove __prefix
Signed-off-by: Markus Elfring <markus.elfring@web.de>
Markus Elfring [Sat, 26 Oct 2013 12:03:43 +0000 (20:03 +0800)]
fix cmake quoting
A few parameters (like "${PROJECT_BINARY_DIR}/lws_config.h" and "${PROJECT_SOURCE_DIR}/lib") are passed to CMake commands in your build script without enclosing them by quotation marks. I see that these places will result in build difficulties if the contents of the used variables will contain special characters like spaces.
Signed-off-by: Markus Elfring <markus.elfring@web.de>
shys [Fri, 25 Oct 2013 13:50:21 +0000 (15:50 +0200)]
cover-proxy-read-EAGAIN.patch
Subject: [PATCH] Because of nonblocking sockets reading from proxy might not
work in one turn. We should check for EAGAIN.
shys [Fri, 25 Oct 2013 13:49:11 +0000 (15:49 +0200)]
Subject: [PATCH] Additional check for EISONN. On iOS "if (connect()) == -1 ||
errno == EISCONN)" doesn't work.
shys [Fri, 25 Oct 2013 13:52:47 +0000 (15:52 +0200)]
Subject: [PATCH] On iOS with nonblocking sockets I experience SSL error which
is not really an error (
http://lists.freeradius.org/pipermail/freeradius-users/2009-August/040155.html
). Added check for that. Additional fixes for comments and logging.
u0u0 [Fri, 25 Oct 2013 09:13:11 +0000 (17:13 +0800)]
fix origin
And fix client header of Origin, add prefix "http://" to make a valid URI, to make golang websocket server happy.
Andy Green [Fri, 25 Oct 2013 14:07:57 +0000 (22:07 +0800)]
defer changing to proxy uri until connected
Reported-by: shyswork
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 24 Oct 2013 14:07:04 +0000 (22:07 +0800)]
add EISCONN handling to client connect attempt
Signed-off-by: Andy Green <andy.green@linaro.org>
shys [Thu, 24 Oct 2013 14:27:08 +0000 (22:27 +0800)]
wait ssl connect completion on client proxy path
Subject: [PATCH] We can ran into situation (at least on iOS) when with openssl
nonblocking BIO and http proxy we don't perform ssl_connect straight away so
we need to retry until we finish ssl_connect. If we don't do that we will
fail in LWS_CONNMODE_WS_CLIENT_WAITING_PROXY_REPLY when testing for "HTTP/1.0
200" successful connection.
Signed-off-by: shys <shyswork@zoho.com>
shys [Thu, 24 Oct 2013 14:12:03 +0000 (22:12 +0800)]
manual proxy forcing api
add function to manually setup proxy. Useful on iOS where
getenv doesn't return proxy settings
Simplified by AG
Signed-off-by: shys <shyswork@zoho.com>
Signed-off-by: Andy Green <andy@warmcat.com>
Arokux X [Thu, 24 Oct 2013 13:53:39 +0000 (21:53 +0800)]
CMAKE help if cwd not git dir
Hi all,
please consider applying the patch below. The git is called in some
different directory and that is why fails. I'm not sure why it was
called in different directory, maybe because I build libwebsockets
with CMake's ExternalProject.
Best,
Arokux
Signed-off-by: Arokux X <arokux@gmail.com>
Andy Green [Thu, 24 Oct 2013 13:47:06 +0000 (21:47 +0800)]
fix typo in NO_SERVER case
Reported-by: shyswork via github
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 21 Oct 2013 22:49:30 +0000 (06:49 +0800)]
use compatible_close for sockets
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 18 Oct 2013 11:23:06 +0000 (19:23 +0800)]
fix clean return path user code handle
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 17 Oct 2013 00:09:19 +0000 (08:09 +0800)]
add explicit error for partial send
This patch adds code to handle the situation that a prepared user buffer could not all be sent on the
socket at once. There are two kinds of situation to handle
1) User code handles it: The connection only has extensions active that do not rewrite the buffer.
In this case, the patch caused libwebsocket_write() to simply return the amount of user buffer that
was consumed (this is specifically the amount of user buffer used in sending what was accepted,
nothing else). So user code can just advance its buffer that much and resume sending when the socket
is writable again. This continues the frame rather than starting a new one or new fragment.
2) The connections has extensions active which actually send something quite different than what the
user buffer contains, for example a compression extension. In this case, libwebsockets will dynamically
malloc a buffer to contain a copy of the remaining unsent data, request notifiction when writeable again,
and automatically spill and free this buffer with the highest priority before passing on the writable
notification to anything else. For this situation, the call to write will return that it used the
whole user buffer, even though part is still rebuffered.
This patch should enable libwebsockets to detect the two cases and take the appropriate action.
There are also two choices for user code to deal with partial sends.
1) Leave the no_buffer_all_partial_tx member in the protocol struct at zero. The library will dyamically
buffer anything you send that did not get completely written to the socket, and automatically spill it next
time the socket is writable. You can use this method if your sent frames are relatvely small and unlikely to get
truncated anyway.
2) Set the no_buffer_all_partial_tx member in the protocol struct. User code now needs to take care of the
return value from libwebsocket_write() and deal with resending the remainder if not all of the requested amount
got sent. You should use this method if you are sending large messages and want to maximize throughput and efficiency.
Since the new member no_buffer_all_partial_tx will be zero by default, this patch will auto-rebuffer any
partial sends by default. That's good for most cases but if you attempt to send large blocks, make sure you
follow option 2) above.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 20 Sep 2013 12:26:12 +0000 (20:26 +0800)]
trac 40 client connection properly nonblocking
As spotted by JM on Trac#40
http://libwebsockets.org/trac/libwebsockets/ticket/40
client connect didn't do anything about being truly nonblocking. This patch
should hopefully solve that.
Signed-off-by: Andy Green <andy.green@linaro.org>
Fujii Bunichiroh [Wed, 18 Sep 2013 13:01:02 +0000 (21:01 +0800)]
force failed header parse to act
''...Websocket servers return failure responses other than HTTP Status 101 in the case of
mismatches of WebSocket version or additional header data etc...
It seems that libwebsockets shows "WARN: problems parsing header" error in such cases without
calling any callbacks or returning error code. Is this right?
I modified lib/client.c to handle this.''
Signed-off-by: Fujii Bunichiroh <Bunichiroh.Fujii@jp.sony.com>
Andy Green [Wed, 18 Sep 2013 12:57:59 +0000 (20:57 +0800)]
remove bae64 decode and selftest
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 18 Sep 2013 04:59:33 +0000 (12:59 +0800)]
trac #39: allow fd 0 for connection
Reported (with fix) by Martijn The http://libwebsockets.org/trac/ticket/39
Signed-off-by: Andy Green <andy.green@linaro.org>
Erland Isaksson [Wed, 18 Sep 2013 01:00:52 +0000 (09:00 +0800)]
cmake fix for osx 64 bit
AG tested on 64-bit Fedora no problems
Signed-off-by: Erland Isaksson <erland@isaksson.info>
Andy Green [Wed, 18 Sep 2013 00:47:15 +0000 (08:47 +0800)]
trac 36 make libwebsocket_set_timeout public
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 18 Sep 2013 00:32:55 +0000 (08:32 +0800)]
change LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION user param usage
Also audit the bail_nuke_ah usage as Daniel Griscom suggested.
Signed-off-by: Andy Green <andy.green@linaro.org>
David Gauchard [Sat, 29 Jun 2013 02:24:16 +0000 (10:24 +0800)]
fix http incomplete send handling
Signed-off-by: David Gauchard <gauchard@laas.fr>
Joachim Bauch [Sat, 29 Jun 2013 02:22:09 +0000 (10:22 +0800)]
Request "send" not to trigger SIGPIPE on errors.
Jiri Hnidek [Sat, 29 Jun 2013 02:18:52 +0000 (10:18 +0800)]
add CMake find function for libwebsockets
Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
Niall T. Davidson [Sat, 29 Jun 2013 02:16:18 +0000 (10:16 +0800)]
Added additional LWS_CALLBACK_CLOSED_HTTP callback to just_kill_connection branch of close_and_free_session
Joachim Bauch [Sun, 23 Jun 2013 06:47:26 +0000 (14:47 +0800)]
Support empty ping and pong packets.
Joachim Bauch [Wed, 19 Jun 2013 13:10:26 +0000 (15:10 +0200)]
Declare "sha1_init" statically to avoid naming conflicts if linked statically with other libraries providing a method with the same name (e.g. OpenSSL).
Andy Green [Mon, 10 Jun 2013 14:54:40 +0000 (22:54 +0800)]
add LWS_CALLBACK_CLOSED_HTTP
Adds a callback to allow handling HTTP protocol connections
closing.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 19 May 2013 06:04:10 +0000 (14:04 +0800)]
trac 28 - differentiate between http serving and accepted http connection
Signed-off-by: Andy Green <andy.green@linaro.org>
Simon Wulf [Sun, 5 May 2013 22:11:53 +0000 (06:11 +0800)]
trac 28 brackets around POLLIN flag test
Signed-off-by: Simon Wulf <simonwulf.lund@bredband.net>
Andy Green [Fri, 3 May 2013 13:13:35 +0000 (21:13 +0800)]
log err if unable to open http file
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 2 May 2013 00:15:53 +0000 (08:15 +0800)]
trac 29 convert more snprintf stowaways
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 1 May 2013 23:04:54 +0000 (07:04 +0800)]
trac 29 echo remoe mention of syslog constants for win32
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Apr 2013 22:53:56 +0000 (06:53 +0800)]
trac 29 avoid syslog in echo test if win32
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Apr 2013 22:51:10 +0000 (06:51 +0800)]
trac 29 eliminate snprintf again
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 27 Apr 2013 00:33:26 +0000 (08:33 +0800)]
trac 29 win32 EWOULDBLOCK
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Apr 2013 23:37:16 +0000 (07:37 +0800)]
Trac 29: win32 fix LWS_VISIBLE issue
Reported-by: davetaflin
Signed-off-by: Andy Green <andy.green@linaro.org>
Bob Roberts [Thu, 25 Apr 2013 01:16:30 +0000 (09:16 +0800)]
cygwin compatibility
Signed-off-by: Bob Roberts <bobroberts177@gmail.com>
thinkski [Tue, 16 Apr 2013 11:48:05 +0000 (19:48 +0800)]
trac 27: use fullpath in OSX dynamic libs
Signed-off-by: thinkski <chiszp@gmail.com>
thinkski [Fri, 12 Apr 2013 02:31:46 +0000 (10:31 +0800)]
pkg config avoid hardcoded prefix
Signed-off-by: thinkski <chiszp@gmail.com>
Tomas Cejka [Thu, 11 Apr 2013 00:13:13 +0000 (08:13 +0800)]
cmake use existing spec file for RPM generation
Signed-off-by: Tomas Cejka <cejkat@cesnet.cz>
Tomas Cejka [Thu, 11 Apr 2013 00:38:02 +0000 (08:38 +0800)]
cmake added RPM generation
Signed-off-by: Tomas Cejka <cejkat@cesnet.cz>
Andy Green [Sat, 30 Mar 2013 02:30:03 +0000 (10:30 +0800)]
cmake improve cross documentation
Signed-off-by: Andy Green <andy.green@linaro.org>
Peter Pentchev [Sat, 30 Mar 2013 01:52:21 +0000 (09:52 +0800)]
Hide private library symbols
Signed-off-by: Peter Pentchev <roam@ringlet.net>
Andy Green [Sat, 23 Mar 2013 01:53:17 +0000 (09:53 +0800)]
SOL_SNDBUF set to protocol rx size
This tells the OS to reserve a TX buffer at least the size of the biggest RX frame
expected, for both server and client connections.
In Linux, the OS reserves 2 x the requested amount.
This is aimed at reducing the partial large atomic frame send problem to the point
it's only coming at large atomic frames the OS balks at reserving the size for.
If you have a lot of data to send, it is better to split it into multiple writes,
and use the FIN / CONTINUATION websocket stuff to manage it.
See the "fraggle" test app for example code of how to do that.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 23 Mar 2013 01:46:18 +0000 (09:46 +0800)]
test server improve return checking
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 23 Mar 2013 01:44:47 +0000 (09:44 +0800)]
cosmetic debug improvements
Signed-off-by: Andy Green <andy.green@linaro.org>
Joakim Soderberg [Sat, 23 Mar 2013 00:55:28 +0000 (08:55 +0800)]
BUGFIX: Properly add libcyassl to the lib list.
This would cause failure to build the test apps with CyaSSL.
Joakim Soderberg [Sat, 23 Mar 2013 00:55:02 +0000 (08:55 +0800)]
Check for GCC/G++ explicitly instead of simply Unix.
Since we're setting gcc specific build flags.
Joakim Soderberg [Mon, 18 Mar 2013 17:08:25 +0000 (17:08 +0000)]
Allow setting the resource path via command line.
It is awfully limiting when you have to set the resource path at compile time.
Instead also allow setting it via the --resource_path command line option.
Andy Green [Sat, 16 Mar 2013 04:32:27 +0000 (12:32 +0800)]
introduce api for unthrottle all connections of protocol
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 16 Mar 2013 04:34:36 +0000 (12:34 +0800)]
test client have u option also reject deflate stream
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 16 Mar 2013 04:32:59 +0000 (12:32 +0800)]
cmake add gcc compile options
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 16 Mar 2013 03:24:23 +0000 (11:24 +0800)]
rxflow remove recursion and simplify
Signed-off-by: Andy Green <andy.green@linaro.org>
Tobias Maier [Thu, 14 Mar 2013 12:02:23 +0000 (13:02 +0100)]
replaced last remaining close on wsi->sock with compatible_close
Signed-off-by: Tobias Maier <tobias.maier@netplace.com>
Michel Archambault [Thu, 14 Mar 2013 15:45:49 +0000 (11:45 -0400)]
Fixed read of the jpg in Windows
Windows needs to open things with _O_BINARY
Signed-off-by: Michel Archambault <marchamb@matrox.com>
Andy Green [Mon, 11 Mar 2013 12:37:03 +0000 (20:37 +0800)]
update service_fd comment and api docs
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 23:16:04 +0000 (07:16 +0800)]
cmake update specfile
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 10 Mar 2013 00:09:25 +0000 (08:09 +0800)]
cmake add missing echo test app
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 10 Mar 2013 00:10:19 +0000 (08:10 +0800)]
cmake packageconfig installs to lib dir
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 10 Mar 2013 00:11:48 +0000 (08:11 +0800)]
cmake ignore non source things for make dist
Signed-off-by: Andy Green <andy.green@linaro.org>
Gregory Junker [Sat, 9 Mar 2013 23:16:26 +0000 (07:16 +0800)]
android include gregorys example makefile
Signed-off-by: Gregory Junker <ggjunker@gmail.com>
Andy Green [Sat, 9 Mar 2013 22:59:01 +0000 (06:59 +0800)]
update version 1.3 soname 4
Signed-off-by: Andy Green <andy.green@linaro.org>
Edwin van den Oetelaar [Sat, 9 Mar 2013 22:53:57 +0000 (06:53 +0800)]
cmake some cosmetic improvementss
Signed-off-by: Edwin van den Oetelaar <oetelaar.automatisering@gmail.com>
Edwin van der Oetelaar [Sat, 9 Mar 2013 22:43:29 +0000 (06:43 +0800)]
autotools remove INSTALL m4 COPYING
Also get rid of m4/ and COPYING, it's a copy of LGPL2.1 but without the
exceptions we added in LICENSE.
Signed-off-by: Edwin van der Oetelaar <oetelaar.automatisering@gmail.com>
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 05:06:37 +0000 (13:06 +0800)]
remove autotools build
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 05:03:53 +0000 (13:03 +0800)]
document revent clearing scheme
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 04:34:30 +0000 (12:34 +0800)]
clear down wsi_lookup on allocation and clear pollfd revents if serviced
This should get rid of a valgrind uninitialized report when using extpoll,
and gives a new way to share the poll loop with external sockets.
If a pollfd says it has something, you can just pass it to
libwebsocket_serice_fd() whether it is a socket handled by lws or not.
If it sees it is a lws socket, the traffic will be handled and
pollfd->revents will be zeroed now.
If the socket is foreign to lws, it leaves revents alone. So you can see
if you should service by checking the pollfd revents after letting
lws try to service it.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 04:54:14 +0000 (12:54 +0800)]
reduce httpd close debug spew
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 04:51:43 +0000 (12:51 +0800)]
cmake fix install path
Signed-off-by: Andy Green <andy.green@linaro.org>
Alex Rhatushnyak [Sat, 9 Mar 2013 04:01:47 +0000 (12:01 +0800)]
correct example lws_write in header
Signed-off-by: Alex Rhatyshnyak <a.rhatushnyak@klervi.com>
Andy Green [Sat, 9 Mar 2013 03:52:18 +0000 (11:52 +0800)]
dont leak when protocol agreement probs
Signed-off-by: Andy Green <andy.green@linaro.org>
Henrik Abelsson [Thu, 7 Mar 2013 14:52:53 +0000 (15:52 +0100)]
Fix printf format error
Signed-off-by: Henrik Abelsson <henrik@abelsson.com>
Andy Green [Sat, 9 Mar 2013 01:16:41 +0000 (09:16 +0800)]
cmake win32 change helper includes to HDR_PUBLIC so they install
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 01:09:05 +0000 (09:09 +0800)]
dont sweat unkknown method for client
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 9 Mar 2013 01:09:46 +0000 (09:09 +0800)]
POLLOUT during wait for server response not an error
Signed-off-by: Andy Green <andy.green@linaro.org>
Arokux B [Tue, 5 Mar 2013 00:41:47 +0000 (08:41 +0800)]
fix win32helpers gettimeofday epoch
Signed-off-by: Arokux B <arokux@gmail.com>
Andy Green [Thu, 28 Feb 2013 09:11:29 +0000 (17:11 +0800)]
trace 22 fix zero length close from client
close() from javascript api in Chrome and Firefox doesn't do the
right thing. It's because the payload is zero-length (with a frame
key...) This fixes it.
Reported-by: 巫书轶
Signed-off-by: Andy Green <andy.green@linaro.org>
Arokux B [Thu, 28 Feb 2013 01:25:02 +0000 (09:25 +0800)]
cmake mingw no need for websock w32
2. Comment out this line
http://git.warmcat.com/cgi-bin/cgit/libwebsockets/tree/CMakeLists.txt#n279
the file websock-w32.c is already compiled indirectly from libwebsockets.c
Signed-off-by: Arokux B <arokux@gmail.com>
Andy Green [Thu, 28 Feb 2013 01:22:38 +0000 (09:22 +0800)]
normalize formatting in gettimeofday
Signed-off-by: Andy Green <andy.green@linaro.org>
Arokux B [Thu, 28 Feb 2013 01:18:38 +0000 (09:18 +0800)]
fix win32 gettimeofday for mingw
here are the problems that I found while compiling libwebsockets with
CMake using as a generator MinGW Makefiles.
1. In http://git.warmcat.com/cgi-bin/cgit/libwebsockets/plain/win32port/win32helpers/gettimeofday.c
Remove spaces around time.h, otherwise it looks for " time.h " and
fails with "No such file ..."
I also needed to comment out
struct timezone
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
It is already declared in mingw's time.h
Signed-off-by: Arokux B <arokux@gmail.com>
Andy Green [Tue, 26 Feb 2013 03:58:45 +0000 (11:58 +0800)]
cmake lib lib64 problem
As discussed here, there's a semi-standardized way to inform
cmake that the install target wants its libs in .../lib64
https://code.google.com/p/bullet/issues/detail?id=174
this patch adds the necessary fiddling
Signed-off-by: Andy Green <andy.green@linaro.org>
Luc [Sat, 23 Feb 2013 03:01:21 +0000 (11:01 +0800)]
fix mime type on leaf header
Signed-off-by: Luc <luc@honk-honk.com>
Andy Green [Sat, 23 Feb 2013 02:50:10 +0000 (10:50 +0800)]
reflect send completeness in lws_write return
under load, writing packet sizes to the socket that are normally fine
can do partial writes, eg asking to write 4096 may only take 2800 of
it and return 2800 from the actual send.
Until now lws assumed that if it was safe to send, it could take any
size buffer, that's not the case under load.
This patch changes lws_write to return the amount actually taken...
that and the meaning of it becomes tricky when dealing with
compressed links, the amount taken and the amount sent differ. Also
there is no way to recover at the moment from a protocol-encoded
frame only being partially accepted... however for http file send
content it can and does recover now.
Small frames don't have to take any care about it but large atomic
sends (> 2K) have been seen to fail under load.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 22 Feb 2013 01:54:35 +0000 (09:54 +0800)]
move ssl cipher list from compiletime to context creation time option
More flexible this way... NULL for the new member means use
the ssl library default set of ciphers, so as long as your info
struct is zerod by bss or memset, you don't need to do anything
about this change unless you want to set the cipher list.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 22 Feb 2013 01:38:54 +0000 (09:38 +0800)]
remove MAX_HEADER_NAME_LENGTH from header
Still lurking aound as a ghost after all real usess of it
were removed with the minilex changes.
Signed-off-by: Andy Green <andy.green@linaro.org>
Joakim Soderberg [Fri, 22 Feb 2013 01:28:17 +0000 (09:28 +0800)]
Fix running test programs from within visual studio.
Copy test-server data to a path so that we can run the test-server from
within visual studio without having to copy stuff around.