geq
d6827f7741
fix build on OpenBSD
2014-07-06 09:36:43 +08:00
Andrew Canaday
da55fb5208
Added HTTP OPTIONS support:
...
- added options to minilex.c
- regenerated lextable.h
- added WSI_TOKEN_OPTIONS_URI to libwebsockets.h
- tweaked parsers.c to accommodate OPTIONS token
- tweaked server.c to set uri_ptr and uri_len for HTTP callback on OPTIONS as well
2014-07-06 09:36:43 +08:00
Andrew Canaday
18fd4f6722
Reducing CPU cycles spent calculating per-header length limit.
2014-07-06 09:33:40 +08:00
Andrew Canaday
3d2ebf3cd7
Added docs for token limits.
2014-07-06 09:33:40 +08:00
Andrew Canaday
74b4a65745
Added optional per-header length limits:
...
- libwebsockets.h:
- * added struct lws_token_limits
* added token limits pointer to lws_context_creation_info
- private-libwebsockets.h: added token limits pointer to lws_context_creation_info
- context.c: copy token limits in create_context
- client.c / server.c: pass context when invoking libwebsocket_parse
- parsers.c:
- * libwebsocket_parse takes context pointer
* issue_char takes context pointer and checks header length against context limits, if defined
* issue_char returns 1 (not -1/0) for header too long, and spill: sets the state to WSI_TOKEN_SKIPPING
2014-07-06 09:33:40 +08:00
Andrew Canaday
b57e7a0e2e
Added HTTP_STATUS_NO_CONTENT == 204
2014-07-06 09:33:40 +08:00
Andrew Canaday
f3b6f25e6a
Added comma after if-none-match...
2014-06-30 05:54:16 -04:00
Andrew Canaday
4220327520
Added new HTTP headers and WSI tokens:
...
- "access-control-request-headers:" <-- WSI_TOKEN_HTTP_AC_REQUEST_HEADERS
- "if-none-match:" <-- WSI_TOKEN_HTTP_IF_NONE_MATCH
2014-06-28 20:19:57 -04:00
Andy Green
dfca3abfa1
clean partial send handling warning
...
Reported-by: Michael Haberler <mail17@mah.priv.at>
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-05-22 11:12:15 +08:00
kolis
f77e6e33d1
Partial send handling
...
AG removed what looked like redundant set eff_buf.token_len <- n
2014-05-20 12:38:29 +08:00
vpeter4
7cc7ae476a
Fix for binding socket to a specific interface ( fixes #116 )
...
also allow binding to IP address with @iface info.iface = "eth0"; info.iface
= "192.168.1.5";
2014-04-28 07:32:14 +08:00
vpeter4
590fb70102
Conditionally declare variable
2014-04-28 07:32:14 +08:00
vpeter4
e035f2ea3e
Compile with older OpenSSL library (missing symbol SSL_set_tlsext_host_name)
2014-04-28 07:32:13 +08:00
vpeter4
7c00fc3d9d
Disable compile error: statement with no effect
2014-04-27 13:35:28 +02:00
vpeter4
4dd8ada592
Disable compile warning: no newline at end of file
2014-04-27 13:28:22 +02:00
Andy Green
6ea337aa3e
introduce LWS_FEATURE_ tests
...
Help user code be compatible with multiple LWS versions by
providing #ifdef -testable flags for API changes
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-21 08:27:19 +09:00
Andy Green
1b2fc03f24
libev stub macros need to reflect void when disabled
...
Reported-by: Michael Harberler <mail17@mah.priv.at>
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-21 07:59:44 +09:00
Patrick Gansterer
c11b847fa8
Windows: Fix implementation of lws_plat_inet_ntop()
...
We need to pass a sockaddr_in6 struct to WSAAddressToString() to have a
working implementation for IPV6. Also use the WideChar version to allow
compilation on Windows CE too.
2014-04-15 18:45:48 +02:00
Patrick Gansterer
fb9dc57068
Windows: Use gai_strerrorW() instead of gai_strerror()
...
This allows compilation on Windows CE too.
2014-04-15 18:42:57 +02:00
Patrick Gansterer
fe0ca596d6
Windows: Fix the passed parameter to the setsockopt function
...
This avoids compiler warnings about missmatched parameter types.
2014-04-15 18:41:38 +02:00
Patrick Gansterer
a6b019aaee
Declare the lws_ssl_capable_*_no_ssl function outside the SSL #ifdef
...
This avoids a compiler warning about a not declared function.
2014-04-15 18:40:31 +02:00
Patrick Gansterer
6bb4b62ede
Fix compilation on Windows CE after cleanup
2014-04-15 18:39:26 +02:00
Patrick Gansterer
1077e1f4d2
Fix include statement of in6addr.h
...
Only include it when CMake can find it. This works with MinGW and WinCE.
2014-04-15 18:38:54 +02:00
Andy Green
f004ec594e
rxflow just return 0 when changing state
...
Nobody cares if we changed state, and callers are
increasingly taking nonzero as fail, causing us to
drop the connection when we re-enable rxflow.
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-12 11:47:25 +08:00
Andy Green
0f58db3940
windows ipv6 add necessary header
...
Thanks to Marjan and Joakim
https://github.com/warmcat/libwebsockets/issues/108#issuecomment-40075600
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-12 11:31:40 +08:00
Andy Green
cdb9bf9bdd
refactor move ssl server service to ssl.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-12 10:07:02 +08:00
Andy Green
a717df2739
refactor libev eliminate all code ifdefs
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-11 13:14:37 +08:00
Andy Green
f4ffc1e215
fixes for close flush
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 17:06:59 +08:00
Andy Green
e7016aae2b
fixup no extentsion around last clean
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 15:15:13 +08:00
Andy Green
a1a24d26a6
close should flush any truncated send before really closing
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 14:25:24 +08:00
Andy Green
d7340c141f
clean=various ifdef reduction
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 14:08:10 +08:00
Andy Green
15d56dd9da
truncated send always callback on writeable
...
Suggested by a Windows log where leaf.jpg meets EAGAIN and after
issuing the truncated send buffer, never sends any more
https://github.com/warmcat/libwebsockets/issues/111#issuecomment-39873129
Added note in README.coding about WRITEABLE callbacks able to
be generated by lws.
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 11:23:18 +08:00
Andy Green
fe660b5c4b
inform timeout source when TIMEDOUT_WAITING
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 11:03:22 +08:00
Andy Green
5b08f12fe8
docs clarify create context comment threading not supported
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 10:13:43 +08:00
Andy Green
47e0c91e2f
move SNI temp var back one
...
Reported as making trouble on Windows by spayton
https://github.com/warmcat/libwebsockets/issues/109
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-08 16:15:02 +01:00
Andy Green
1a308e4176
define LWS_SSL_CAPPABLE return codes even when no SSL enabled
...
Reported by fuzzy
https://github.com/warmcat/libwebsockets/issues/107
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-08 07:26:30 +01:00
spayton
5b94c3b449
Update private-libwebsockets.h
...
fixes windows http file serve - macro compatible_file_read() incorrectly used 'amount' instead of '_amount'
2014-04-08 07:22:53 +01:00
Joakim Soderberg
d2f5b199bc
windows Fix build.
2014-04-07 13:13:45 +01:00
Andy Green
e9b61b5ba5
windows clean out redundant inet_ntop prototype
...
Suggested by Joakim Soderberg https://github.com/warmcat/libwebsockets/issues/103#issuecomment-39684559
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-07 06:25:07 +01:00
Andy Green
529d4814d0
fix ssl error reporting
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 12:41:31 +01:00
Andy Green
485abc1c66
allow signals during send
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 12:41:20 +01:00
Andy Green
8e18fe3a94
fix accept nonzero as close from WRITEABLE callback
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 12:40:16 +01:00
Andy Green
78f266a525
refactor use unified ssl read write functions
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 07:24:45 +01:00
Andy Green
02138126f2
refactor add ssl read write single implementation
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 06:26:35 +01:00
Andy Green
b25b85f606
windows allow syslog log target to mao to stderr
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 23:34:09 +08:00
Andy Green
92795d64db
windows fix breakage from plat refactor
...
Reported-by Marjan Tomas
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 22:38:49 +08:00
Andy Green
a5fe1192cf
windows fix SetFilePointer args
...
This restricts it to 4GB files on 32-bit Windows but it'll do for now.
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 19:52:37 +08:00
Andy Green
2eedea9884
http2 add initial alpn support
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 14:33:48 +08:00
Andy Green
c57037a555
refactor ssl related code into ssl.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 10:17:00 +08:00
Andy Green
b49a995a8d
clean small additional ifdef reduction
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 10:11:04 +08:00