c428b6f63a838fb617b97a7e378bec7138504572
[platform/upstream/libwebsockets.git] / changelog
1 Changelog
2 ---------
3
4 v1.23-chrome32-firefox24
5 ========================
6
7  Android.mk                            |   29 +
8  CMakeLists.txt                        |  573 ++++++++----
9  COPYING                               |  503 -----------
10  INSTALL                               |  365 --------
11  Makefile.am                           |   13 -
12  README.build                          |  371 ++------
13  README.coding                         |   63 ++
14  autogen.sh                            | 1578 ---------------------------------
15  changelog                             |   69 ++
16  cmake/FindGit.cmake                   |  163 ++++
17  cmake/FindOpenSSLbins.cmake           |   15 +-
18  cmake/UseRPMTools.cmake               |  176 ++++
19  config.h.cmake                        |   25 +-
20  configure.ac                          |  226 -----
21  cross-arm-linux-gnueabihf.cmake       |   28 +
22  lib/Makefile.am                       |   89 --
23  lib/base64-decode.c                   |   98 +-
24  lib/client-handshake.c                |  123 ++-
25  lib/client-parser.c                   |   19 +-
26  lib/client.c                          |  145 ++-
27  lib/daemonize.c                       |    4 +-
28  lib/extension.c                       |    2 +-
29  lib/getifaddrs.h                      |    4 +-
30  lib/handshake.c                       |   76 +-
31  lib/libwebsockets.c                   |  491 ++++++----
32  lib/libwebsockets.h                   |  164 ++--
33  lib/output.c                          |  214 ++++-
34  lib/parsers.c                         |  102 +--
35  lib/private-libwebsockets.h           |   66 +-
36  lib/server-handshake.c                |    5 +-
37  lib/server.c                          |   29 +-
38  lib/sha-1.c                           |    2 +-
39  libwebsockets-api-doc.html            |  249 +++---
40  libwebsockets.pc.in                   |   11 -
41  libwebsockets.spec                    |   14 +-
42  m4/ignore-me                          |    2 -
43  scripts/FindLibWebSockets.cmake       |   33 +
44  scripts/kernel-doc                    |    1 +
45  test-server/Makefile.am               |  131 ---
46  test-server/leaf.jpg                  |  Bin 0 -> 2477518 bytes
47  test-server/test-client.c             |   78 +-
48  test-server/test-echo.c               |   33 +-
49  test-server/test-fraggle.c            |   26 +-
50  test-server/test-ping.c               |   15 +-
51  test-server/test-server.c             |  197 +++-
52  test-server/test.html                 |    5 +-
53  win32port/win32helpers/gettimeofday.c |   74 +-
54  win32port/win32helpers/websock-w32.h  |    6 +-
55  48 files changed, 2493 insertions(+), 4212 deletions(-)
56
57
58 User api additions
59 ------------------
60
61  - You can now call libwebsocket_callback_on_writable() on http connectons,
62         and get a LWS_CALLBACK_HTTP_WRITEABLE callback, the same way you can
63         regulate writes with a websocket protocol connection.
64
65  - A new member in the context creation parameter struct "ssl_cipher_list" is
66         added, replacing CIPHERS_LIST_STRING.  NULL means use the ssl library
67         default list of ciphers.
68
69  - Not really an api addition, but libwebsocket_service_fd() will now zero
70         the revents field of the pollfd it was called with if it handled the
71         descriptor.  So you can tell if it is a non-lws fd by checking revents
72         after the service call... if it's still nonzero, the descriptor
73         belongs to you and you need to take care of it.
74
75  - libwebsocket_rx_flow_allow_all_protocol(protocol) will unthrottle all
76         connections with the established protocol.  It's designed to be
77         called from user server code when it sees it can accept more input
78         and may have throttled connections using the server rx flow apis
79         while it was unable to accept any other input  The user server code
80         then does not have to try to track while connections it choked, this
81         will free up all of them in one call.
82
83  - there's a new, optional callback LWS_CALLBACK_CLOSED_HTTP which gets
84         called when an HTTP protocol socket closes
85
86  - for LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION callback, the user_space alloc
87         has already been done before the callback happens.  That means we can
88         use the user parameter to the callback to contain the user pointer, and
89         move the protocol name to the "in" parameter.  The docs for this
90         callback are also updated to reflect how to check headers in there.
91
92  - libwebsocket_client_connect() is now properly nonblocking and async.  See
93         README.coding and test-client.c for information on the callbacks you
94         can rely on controlling the async connection period with.
95
96  - if your OS does not support the http_proxy environment variable convention
97         (eg, reportedly OSX), you can use a new api libwebsocket_set_proxy()
98         to set the proxy details inbetween context creation and the connection
99         action.  For OSes that support http_proxy, that's used automatically.
100
101 User api changes
102 ----------------
103
104  - the external poll callbacks now get the socket descriptor coming from the
105         "in" parameter.  The user parameter provides the user_space for the
106         wsi as it normally does on the other callbacks.
107         LWS_CALLBACK_FILTER_NETWORK_CONNECTION also has the socket descriptor
108         delivered by @in now instead of @user.
109
110  - libwebsocket_write() now returns -1 for error, or the amount of data
111         actually accepted for send.  Under load, the OS may signal it is
112         ready to send new data on the socket, but have only a restricted
113         amount of memory to buffer the packet compared to usual.
114
115
116 User api removal
117 ----------------
118
119  - libwebsocket_ensure_user_space() is removed from the public api, if you
120         were using it to get user_space, you need to adapt your code to only
121         use user_space inside the user callback.
122
123  - CIPHERS_LIST_STRING is removed
124
125  - autotools build has been removed.  See README.build for info on how to
126         use CMake for your platform
127
128
129 v1.21-chrome26-firefox18
130 ========================
131
132  - Fixes buffer overflow bug in max frame size handling if you used the
133         default protocol buffer size.  If you declared rx_buffer_size in your
134         protocol, which is recommended anyway, your code was unaffected.
135
136 v1.2-chrome26-firefox18
137 =======================
138
139 Diffstat
140 --------
141
142  .gitignore                                                      |  16 +++
143  CMakeLists.txt                                                  | 544 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
144  LICENSE                                                         | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
145  Makefile.am                                                     |   1 +
146  README                                                          |  20 +++
147  README.build                                                    | 258 ++++++++++++++++++++++++++++++++-----
148  README.coding                                                   |  52 ++++++++
149  changelog                                                       | 136 ++++++++++++++++++++
150  cmake/FindOpenSSLbins.cmake                                     |  33 +++++
151  config.h.cmake                                                  | 173 +++++++++++++++++++++++++
152  configure.ac                                                    |  22 +++-
153  lib/Makefile.am                                                 |  20 ++-
154  lib/base64-decode.c                                             |   2 +-
155  lib/client-handshake.c                                          | 190 +++++++++++-----------------
156  lib/client-parser.c                                             |  88 +++++++------
157  lib/client.c                                                    | 384 ++++++++++++++++++++++++++++++-------------------------
158  lib/daemonize.c                                                 |  32 +++--
159  lib/extension-deflate-frame.c                                   |  58 +++++----
160  lib/extension-deflate-stream.c                                  |  19 ++-
161  lib/extension-deflate-stream.h                                  |   4 +-
162  lib/extension.c                                                 |  11 +-
163  lib/getifaddrs.c                                                | 315 +++++++++++++++++++++++-----------------------
164  lib/getifaddrs.h                                                |  30 ++---
165  lib/handshake.c                                                 | 124 +++++++++++-------
166  lib/libwebsockets.c                                             | 736 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
167  lib/libwebsockets.h                                             | 237 ++++++++++++++++++++++------------
168  lib/output.c                                                    | 192 +++++++++++-----------------
169  lib/parsers.c                                                   | 966 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------
170  lib/private-libwebsockets.h                                     | 225 +++++++++++++++++++++------------
171  lib/server-handshake.c                                          |  82 ++++++------
172  lib/server.c                                                    |  96 +++++++-------
173  libwebsockets-api-doc.html                                      | 189 ++++++++++++++++++----------
174  libwebsockets.spec                                              |  17 +--
175  test-server/attack.sh                                           | 148 ++++++++++++++++++++++
176  test-server/test-client.c                                       | 125 +++++++++---------
177  test-server/test-echo.c                                         |  31 +++--
178  test-server/test-fraggle.c                                      |  32 ++---
179  test-server/test-ping.c                                         |  52 ++++----
180  test-server/test-server.c                                       | 129 ++++++++++++-------
181  win32port/libwebsocketswin32/libwebsocketswin32.vcxproj         | 279 ----------------------------------------
182  win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters |  23 +++-
183  41 files changed, 4398 insertions(+), 2219 deletions(-)
184
185
186 User api additions
187 ------------------
188
189  - lws_get_library_version() returns a const char * with a string like
190          "1.1 9e7f737", representing the library version from configure.ac
191          and the git HEAD hash the library was built from
192
193  - TCP Keepalive can now optionally be applied to all lws sockets, on Linux
194         also with controllable timeout, number of probes and probe interval.
195         (On BSD type OS, you can only use system default settings for the
196         timing and retries, although enabling it is supported by setting
197         ka_time to nonzero, the exact value has no meaning.)
198         This enables detection of idle connections which are logically okay,
199         but are in fact dead, due to network connectivity issues at the server,
200         client, or any intermediary.  By default it's not enabled, but you
201         can enable it by setting a non-zero timeout (in seconds) at the new
202         ka_time member at context creation time.
203
204  - Two new optional user callbacks added, LWS_CALLBACK_PROTOCOL_DESTROY which
205         is called one-time per protocol as the context is being destroyed, and
206         LWS_CALLBACK_PROTOCOL_INIT which is called when the context is created
207         and the protocols are added, again it's a one-time affair.
208         This lets you manage per-protocol allocations properly including
209         cleaning up after yourself when the server goes down.
210
211 User api changes
212 ----------------
213
214  - libwebsocket_create_context() has changed from taking a ton of parameters
215         to just taking a pointer to a struct containing the parameters.  The
216         struct lws_context_creation_info is in libwebsockets.h, the members
217         are in the same order as when they were parameters to the call
218         previously.  The test apps are all updated accordingly so you can
219         see example code there.
220
221  - Header tokens are now deleted after the websocket connection is
222         established.  Not just the header data is saved, but the pointer and
223         length array is also removed from (union) scope saving several hundred
224         bytes per connection once it is established
225
226  - struct libwebsocket_protocols has a new member rx_buffer_size, this
227         controls rx buffer size per connection of that protocol now.  Sources
228         for apps built against older versions of the library won't declare
229         this in their protocols, defaulting it to 0.  Zero buffer is legal,
230         it causes a default buffer to be allocated (currently 4096)
231
232         If you want to receive only atomic frames in your user callback, you
233         should set this to greater than your largest frame size.  If a frame
234         comes that exceeds that, no error occurs but the callback happens as
235         soon as the buffer limit is reached, and again if it is reached again
236         or the frame completes.  You can detect that has happened by seeing
237         there is still frame content pending using
238         libwebsockets_remaining_packet_payload()
239
240         By correctly setting this, you can save a lot of memory when your
241         protocol has small frames (see the test server and client sources).
242
243  - LWS_MAX_HEADER_LEN now defaults to 1024 and is the total amount of known
244         header payload lws can cope with, that includes the GET URL, origin
245         etc.  Headers not understood by lws are ignored and their payload
246         not included in this.
247
248
249 User api removals
250 -----------------
251
252  - The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
253         buffer size chosen per-protocol.  For compatibility, there's a default
254         of 4096 rx buffer, but user code should set the appropriate size for
255         the protocol frames.
256
257  - LWS_INITIAL_HDR_ALLOC and LWS_ADDITIONAL_HDR_ALLOC are no longer needed
258         and have been removed.  There's a new header management scheme that
259         handles them in a much more compact way.
260
261  - libwebsockets_hangup_on_client() is removed.  If you want to close the
262         connection you must do so from the user callback and by returning
263         -1 from there.
264
265  - libwebsocket_close_and_free_session() is now private to the library code
266         only and not exposed for user code.  If you want to close the
267         connection, you must do so from the user callback by returning -1
268         from there.
269
270
271 New features
272 ------------
273
274  - Cmake project file added, aimed initially at Windows support: this replaces
275         the visual studio project files that were in the tree until now.
276
277  - CyaSSL now supported in place of OpenSSL (--use-cyassl on configure)
278
279  - PATH_MAX or MAX_PATH no longer needed
280
281  - cutomizable frame rx buffer size by protocol
282
283  - optional TCP keepalive so dead peers can be detected, can be enabled at
284         context-creation time
285
286  - valgrind-clean: no SSL or CyaSSL: completely clean.  With OpenSSL, 88 bytes
287         lost at OpenSSL library init and symptomless reports of uninitialized
288         memory usage... seems to be a known and ignored problem at OpenSSL
289
290  - By default debug is enabled and the library is built for -O0 -g to faclitate
291         that.  Use --disable-debug configure option to build instead with -O4
292         and no -g (debug info), obviously providing best performance and
293         reduced binary size.
294
295  - 1.0 introduced some code to try to not deflate small frames, however this
296         seems to break when confronted with a mixture of frames above and
297         below the threshold, so it's removed.  Veto the compression extension
298         in your user callback if you will typically have very small frames.
299
300  - There are many memory usage improvements, both a reduction in malloc/
301         realloc and architectural changes.  A websocket connection now
302         consumes only 296 bytes with SSL or 272 bytes without on x86_64,
303         during header processing an additional 1262 bytes is allocated in a
304         single malloc, but is freed when the websocket connection starts.
305         The RX frame buffer defined by the protocol in user
306         code is also allocated per connection, this represents the largest
307         frame you can receive atomically in that protocol.
308
309  - On ARM9 build, just http+ws server no extensions or ssl, <12Kbytes .text
310         and 112 bytes per connection (+1328 only during header processing)
311
312
313 v1.1-chrome26-firefox18
314 =======================
315
316 Diffstat
317 --------
318
319  Makefile.am                            |    4 +
320  README-test-server                     |  291 ---
321  README.build                           |  239 ++
322  README.coding                          |  138 ++
323  README.rst                             |   72 -
324  README.test-apps                       |  272 +++
325  configure.ac                           |  116 +-
326  lib/Makefile.am                        |   55 +-
327  lib/base64-decode.c                    |    5 +-
328  lib/client-handshake.c                 |  121 +-
329  lib/client-parser.c                    |  394 ++++
330  lib/client.c                           |  807 +++++++
331  lib/daemonize.c                        |  212 ++
332  lib/extension-deflate-frame.c          |  132 +-
333  lib/extension-deflate-stream.c         |   12 +-
334  lib/extension-x-google-mux.c           | 1223 ----------
335  lib/extension-x-google-mux.h           |   96 -
336  lib/extension.c                        |    8 -
337  lib/getifaddrs.c                       |  271 +++
338  lib/getifaddrs.h                       |   76 +
339  lib/handshake.c                        |  582 +----
340  lib/libwebsockets.c                    | 2493 ++++++---------------
341  lib/libwebsockets.h                    |  115 +-
342  lib/md5.c                              |  217 --
343  lib/minilex.c                          |  440 ++++
344  lib/output.c                           |  628 ++++++
345  lib/parsers.c                          | 2016 +++++------------
346  lib/private-libwebsockets.h            |  284 +--
347  lib/server-handshake.c                 |  275 +++
348  lib/server.c                           |  377 ++++
349  libwebsockets-api-doc.html             |  300 +--
350  m4/ignore-me                           |    2 +
351  test-server/Makefile.am                |  111 +-
352  test-server/libwebsockets.org-logo.png |  Bin 0 -> 7029 bytes
353  test-server/test-client.c              |   45 +-
354  test-server/test-echo.c                |  330 +++
355  test-server/test-fraggle.c             |   20 +-
356  test-server/test-ping.c                |   22 +-
357  test-server/test-server-extpoll.c      |  554 -----
358  test-server/test-server.c              |  349 ++-
359  test-server/test.html                  |    3 +-
360  win32port/zlib/ZLib.vcxproj            |  749 ++++---
361  win32port/zlib/ZLib.vcxproj.filters    |  188 +-
362  win32port/zlib/adler32.c               |  348 ++-
363  win32port/zlib/compress.c              |  160 +-
364  win32port/zlib/crc32.c                 |  867 ++++----
365  win32port/zlib/crc32.h                 |  882 ++++----
366  win32port/zlib/deflate.c               | 3799 +++++++++++++++-----------------
367  win32port/zlib/deflate.h               |  688 +++---
368  win32port/zlib/gzclose.c               |   50 +-
369  win32port/zlib/gzguts.h                |  325 ++-
370  win32port/zlib/gzlib.c                 | 1157 +++++-----
371  win32port/zlib/gzread.c                | 1242 ++++++-----
372  win32port/zlib/gzwrite.c               | 1096 +++++----
373  win32port/zlib/infback.c               | 1272 ++++++-----
374  win32port/zlib/inffast.c               |  680 +++---
375  win32port/zlib/inffast.h               |   22 +-
376  win32port/zlib/inffixed.h              |  188 +-
377  win32port/zlib/inflate.c               | 2976 +++++++++++++------------
378  win32port/zlib/inflate.h               |  244 +-
379  win32port/zlib/inftrees.c              |  636 +++---
380  win32port/zlib/inftrees.h              |  124 +-
381  win32port/zlib/trees.c                 | 2468 +++++++++++----------
382  win32port/zlib/trees.h                 |  256 +--
383  win32port/zlib/uncompr.c               |  118 +-
384  win32port/zlib/zconf.h                 |  934 ++++----
385  win32port/zlib/zlib.h                  | 3357 ++++++++++++++--------------
386  win32port/zlib/zutil.c                 |  642 +++---
387  win32port/zlib/zutil.h                 |  526 ++---
388  69 files changed, 19556 insertions(+), 20145 deletions(-)
389
390 user api changes
391 ----------------
392
393  - libwebsockets_serve_http_file() now takes a context as first argument
394
395  - libwebsockets_get_peer_addresses() now takes a context and wsi as first
396         two arguments
397
398
399 user api additions
400 ------------------
401
402  - lwsl_...() logging apis, default to stderr but retargetable by user code;
403         may be used also by user code
404
405  - lws_set_log_level() set which logging apis are able to emit (defaults to
406         notice, warn, err severities), optionally set the emit callback
407
408  - lwsl_emit_syslog() helper callback emits to syslog
409
410  - lws_daemonize() helper code that forks the app into a headless daemon
411         properly, maintains a lock file with pid in suitable for sysvinit etc to
412         control lifecycle
413
414  - LWS_CALLBACK_HTTP_FILE_COMPLETION callback added since http file
415         transfer is now asynchronous (see test server code)
416
417  - lws_frame_is_binary() from a wsi pointer, let you know if the received
418         data was sent in BINARY mode
419
420
421 user api removals
422 -----------------
423
424  - libwebsockets_fork_service_loop() - no longer supported (had intractable problems)
425         arrange your code to act from the user callback instead from same
426         process context as the service loop
427
428  - libwebsockets_broadcast() - use libwebsocket_callback_on_writable[_all_protocol]()
429         instead from same process context as the service loop.  See the test apps
430         for examples.
431
432  - x-google-mux() removed until someone wants it
433
434  - pre -v13 (ancient) protocol support removed
435
436
437 New features
438 ------------
439
440  - echo test server and client compatible with echo.websocket.org added
441
442  - many new configure options (see README.build) to reduce footprint of the
443         library to what you actually need, eg, --without-client and
444         --without-server
445
446  - http + websocket server can build to as little as 12K .text for ARM
447
448  - no more MAX_CLIENTS limitation; adapts to support the max number of fds
449         allowed to the process by ulimit, defaults to 1024 on Fedora and
450         Ubuntu.  Use ulimit to control this without needing to configure
451         the library.  Code here is smaller and faster.
452
453  - adaptive ratio of listen socket to connection socket service allows
454         good behaviour under Apache ab test load.  Tested with thousands
455         of simultaneous connections
456
457  - reduction in per-connection memory footprint by moving to a union to hold
458         mutually-exclusive state for the connection
459
460  - robustness: Out of Memory taken care of for all allocation code now
461
462  - internal getifaddrs option if your toolchain lacks it (some uclibc)
463
464  - configurable memory limit for deflate operations
465
466  - improvements in SSL code nonblocking operation, possible hang solved,
467         some SSL operations broken down into pollable states so there is
468         no library blocking, timeout coverage for SSL_connect
469
470  - extpoll test server merged into single test server source
471
472  - robustness: library should deal with all recoverable socket conditions
473
474  - rx flowcontrol for backpressure notification fixed and implmeneted
475         correctly in the test server
476
477  - optimal lexical parser added for header processing; all headers in a
478         single 276-byte state table
479
480  - latency tracking api added (configure --with-latency)
481
482  - Improved in-tree documentation, REAME.build, README.coding,
483         README.test-apps, changelog
484
485  - Many small fixes
486
487
488 v1.0-chrome25-firefox17 (6cd1ea9b005933f)