forked from boazsegev/facil.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangelog.html
More file actions
1439 lines (973 loc) · 101 KB
/
changelog.html
File metadata and controls
1439 lines (973 loc) · 101 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html><head><meta charset="utf-8" /><meta content="IE=edge" http-equiv="X-UA-Compatible" /><meta content="width=device-width, initial-scale=1, maximum-scale=2.0, user-scalable=yes, minimal-ui=yes" name="viewport" /><title>facil.io - a light web application framework in C, with support for HTTP, WebSockets and Pub/Sub out of the box.</title><meta content="facil.io - a light web application framework in C, with support for HTTP, WebSockets and Pub/Sub out of the box." name="description" /><link href="https://fonts.googleapis.com/css?family=Montserrat|Quicksand|Karla" rel="stylesheet" type="text/css" /><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script><link href="/assets/styles/main.css" rel="stylesheet" type="text/css" /><script type="application/ld+json">{"@context":"http://schema.org","@type":"WebSite","url":"http://facil.io","name":"facil.io","description":"facil.io - a light web application framework in C, with support for HTTP, WebSockets and Pub/Sub out of the box.","keywords":"C, web, framework, websockets, websocket, realtime, real-time, easy","image":"http://facil.io/website/logo/facil-io.svg","author":[{"@type":"Person","name":"Bo (Myst)","url":"http://stackoverflow.com/users/4025095/myst","email":"bo(at)facil.io"}],"sourceOrganization":{"@context":"http://schema.org","@type":"Organization","name":"Plezi","url":"http://facil.io","description":"facil.io - a light web application framework in C, with support for HTTP, WebSockets and Pub/Sub out of the box.","logo":"http://facil.io/website/logo/facil-io.svg","image":"http://facil.io/website/logo/facil-io.svg","email":"bo(at)facil.io","member":[{"@type":"Person","name":"Bo (Myst)","url":"http://stackoverflow.com/users/4025095/myst","email":"bo(at)facil.io"}]}}</script><link href="/assets/logo/facil-io-logo.svg" rel="icon" sizes="350x350" type="image/svg" /><link href="/assets/logo/facil-io-logo.png" rel="icon" sizes="350x350" type="image/png" /><link href="/assets/logo/facil-io-logo.svg" rel="shortcut icon" sizes="350x350" type="image/svg" /><link href="/assets/logo/facil-io-logo.png" rel="shortcut icon" sizes="350x350" type="image/png" /><link href="/assets/logo/facil-io-logo.svg" rel="apple-touch-icon" sizes="350x350" type="image/svg" /><link href="/assets/logo/facil-io-logo.png" rel="apple-touch-icon" sizes="350x350" type="image/png" /><link href="/assets/logo/facil-io-logo.svg" rel="fluid-icon" sizes="350x350" type="image/svg" /><link href="/assets/logo/facil-io-logo.png" rel="fluid-icon" sizes="350x350" type="image/png" /><link href="/manifest.json" rel="manifest" /><meta content="facil.io" name="apple-mobile-web-app-title" /><meta content="facil.io - the C Web Application Framework" name="application-name" /><meta content="#b91d47" name="msapplication-TileColor" /><meta content="/mstile-144x144.png" name="msapplication-TileImage" /><meta content="#ffffff" name="theme-color" /></head><body><a href="/" id="logo"></a><input id="show_nav" type="checkbox" /><nav id="top_nav"><ul><li><a href="/0.7.x/index">Latest Docs</a></li><li><a href="https://github.com/boazsegev/facil.io" target="_blank">Source Code</a></li><li><a href="javascript: change_themes();" id="theme">Night Theme</a></li></ul></nav><input id="show_sidebar" type="checkbox" /><nav id="side_bar"><h2 id="documentation">Documentation</h2>
<p>Please choose the relevant facil.io version to read it's documentation:</p>
<ul>
<li><p><a href="/0.7.x/index">0.7.x</a> (stable)</p></li>
<li><p><a href="/0.6.x/index">0.6.x</a> (legacy)</p></li>
</ul>
<h2 id="versions">Versions</h2>
<p>Review the <a href="changelog">change-log</a> when migrating between versions.</p>
<ul>
<li><p><a href="changelog">Change Log</a></p></li>
<li><p><strong>Latest (stable)</strong>: 0.7.2</p></li>
<li><p><strong>Legacy</strong>: 0.6.4</p></li>
</ul>
</nav><div id="md_container"><div class='toc'><ul>
<li>
<a href="#change-log">Change Log</a>
<ul>
<li>
<ul>
<li>
<a href="#v-0-7-5-2020-05-18">v. 0.7.5 (2020-05-18)</a>
</li>
<li>
<a href="#v-0-7-4">v. 0.7.4</a>
</li>
<li>
<a href="#v-0-7-3">v. 0.7.3</a>
</li>
<li>
<a href="#v-0-7-2">v. 0.7.2</a>
</li>
<li>
<a href="#v-0-7-1">v. 0.7.1</a>
</li>
<li>
<a href="#v-0-7-0">v. 0.7.0</a>
</li>
<li>
<a href="#v-0-7-0-beta8">v. 0.7.0.beta8</a>
</li>
<li>
<a href="#v-0-7-0-beta7">v. 0.7.0.beta7</a>
</li>
<li>
<a href="#v-0-7-0-beta6">v. 0.7.0.beta6</a>
</li>
<li>
<a href="#v-0-7-0-beta5">v. 0.7.0.beta5</a>
</li>
<li>
<a href="#v-0-7-0-beta4">v. 0.7.0.beta4</a>
</li>
<li>
<a href="#v-0-7-0-beta3">v. 0.7.0.beta3</a>
</li>
<li>
<a href="#v-0-7-0-beta2">v. 0.7.0.beta2</a>
</li>
<li>
<a href="#v-0-6-4">v. 0.6.4</a>
</li>
<li>
<a href="#v-0-7-0-beta1">v. 0.7.0.beta1</a>
</li>
<li>
<a href="#v-0-6-3">v. 0.6.3</a>
</li>
<li>
<a href="#v-0-6-2">v. 0.6.2</a>
</li>
<li>
<a href="#v-0-6-1">v. 0.6.1</a>
</li>
<li>
<a href="#v-0-6-0">v. 0.6.0</a>
</li>
<li>
<a href="#v-0-6-0-beta-8">v. 0.6.0.beta.8</a>
</li>
<li>
<a href="#v-0-6-0-beta-7">v. 0.6.0.beta.7</a>
</li>
<li>
<a href="#v-0-6-0-beta-6">v. 0.6.0.beta.6</a>
</li>
<li>
<a href="#v-0-6-0-beta-5">v. 0.6.0.beta.5</a>
</li>
<li>
<a href="#v-0-6-0-beta-4">v. 0.6.0.beta.4</a>
</li>
<li>
<a href="#v-0-6-0-beta-3">v. 0.6.0.beta.3</a>
</li>
<li>
<a href="#v-0-6-0-beta-2">v. 0.6.0.beta.2</a>
</li>
<li>
<a href="#v-0-6-0-beta">v. 0.6.0.beta</a>
</li>
<li>
<a href="#v-0-6-0-dev">v. 0.6.0.dev</a>
</li>
<li>
<a href="#ver-0-5-10-backported">Ver. 0.5.10 (backported)</a>
</li>
<li>
<a href="#ver-0-5-9-backported">Ver. 0.5.9 (backported)</a>
</li>
<li>
<a href="#ver-0-5-8">Ver. 0.5.8</a>
</li>
<li>
<a href="#ver-0-5-7">Ver. 0.5.7</a>
</li>
<li>
<a href="#ver-0-5-6-yanked">Ver. 0.5.6 (yanked)</a>
</li>
<li>
<a href="#ver-0-5-5">Ver. 0.5.5</a>
</li>
<li>
<a href="#ver-0-5-4">Ver. 0.5.4</a>
</li>
<li>
<a href="#ver-0-5-3-unreleased-included-in-0-5-4">Ver. 0.5.3 (unreleased, included in 0.5.4)</a>
</li>
<li>
<a href="#ver-0-5-2">Ver. 0.5.2</a>
</li>
<li>
<a href="#ver-0-5-1">Ver. 0.5.1</a>
</li>
<li>
<a href="#ver-0-5-0">Ver. 0.5.0</a>
</li>
<li>
<a href="#ver-0-4-4">Ver. 0.4.4</a>
</li>
<li>
<a href="#ver-0-4-3">Ver. 0.4.3</a>
</li>
<li>
<a href="#ver-0-4-2">Ver. 0.4.2</a>
</li>
<li>
<a href="#ver-0-4-1">Ver. 0.4.1</a>
</li>
<li>
<a href="#ver-0-4-0">Ver. 0.4.0</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#historic-change-log">Historic Change log</a>
<ul>
<li>
<a href="#general-notes-and-future-plans">General notes and <u>future</u> plans</a>
</li>
<li>
<a href="#a-note-about-version-numbers">A note about version numbers</a>
</li>
<li>
<a href="#lib-react">Lib-React</a>
<ul>
<li>
<a href="#v-0-3-0">V. 0.3.0</a>
</li>
<li>
<a href="#v-0-2-2">V. 0.2.2</a>
</li>
<li>
<a href="#v-0-2-1">V. 0.2.1</a>
</li>
</ul>
</li>
<li>
<a href="#lib-sock">Lib-Sock</a>
<ul>
<li>
<a href="#v-0-2-3-next-version-number">V. 0.2.3 (next version number)</a>
</li>
<li>
<a href="#v-0-2-2">V. 0.2.2</a>
</li>
<li>
<a href="#v-0-2-1">V. 0.2.1</a>
</li>
<li>
<a href="#v-0-2-0">V. 0.2.0</a>
</li>
<li>
<a href="#v-0-1-0">V. 0.1.0</a>
</li>
<li>
<a href="#v-0-0-6">V. 0.0.6</a>
</li>
<li>
<a href="#v-0-0-5">V. 0.0.5</a>
</li>
<li>
<a href="#v-0-0-4">V. 0.0.4</a>
</li>
<li>
<a href="#v-0-0-3">V. 0.0.3</a>
</li>
<li>
<a href="#v-0-0-2">V. 0.0.2</a>
</li>
<li>
<a href="#v-0-0-1">V. 0.0.1</a>
</li>
</ul>
</li>
<li>
<a href="#lib-async">Lib-Async</a>
<ul>
<li>
<a href="#v-0-4-0">V. 0.4.0</a>
</li>
<li>
<a href="#v-0-3-0">V. 0.3.0</a>
</li>
</ul>
</li>
<li>
<a href="#lib-server">Lib-Server</a>
<ul>
<li>
<a href="#v-0-4-2-next-version-number">V. 0.4.2 (next version number)</a>
</li>
<li>
<a href="#v-0-4-1">V. 0.4.1</a>
</li>
<li>
<a href="#v-0-4-0">V. 0.4.0</a>
</li>
<li>
<a href="#v-0-3-5">V. 0.3.5</a>
</li>
<li>
<a href="#v-0-3-4">V. 0.3.4</a>
</li>
<li>
<a href="#v-0-3-3">V. 0.3.3</a>
</li>
<li>
<a href="#v-0-3-2">V. 0.3.2</a>
</li>
</ul>
</li>
<li>
<a href="#minicrypt-development-incomplete">MiniCrypt (development incomplete)</a>
<ul>
<li>
<a href="#v-0-1-1">V. 0.1.1</a>
</li>
</ul>
</li>
<li>
<a href="#http-protocol">HTTP Protocol</a>
</li>
<li>
<a href="#websocket-extension">Websocket extension</a>
<ul>
<li>
<a href="#date-20160607">Date 20160607</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div><h1 id="change-log">Change Log</h1>
<h3 id="v-0-7-5-2020-05-18">v. 0.7.5 (2020-05-18)</h3>
<p><strong>Security</strong>: backport the 0.8.x HTTP/1.1 parser and it's security updates to the 0.7.x version branch. This fixes a request smuggling attack vector and Transfer Encoding attack vector that were exposed by Sam Sanoop from <a href="https://snyk.io">the Snyk Security team (snyk.io)</a>. The parser was updated to deal with these potential issues.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixes an issue with date calculation by backporting code from the 0.8.x branch.</p>
<p><strong>Fix</strong>: (<code>fio</code>) call less signal handlers during shutdown.</p>
<h3 id="v-0-7-4">v. 0.7.4</h3>
<p><strong>Fix</strong>: (<code>http</code>) fixes an issue and improves support for <code>chunked</code> encoded payloads. Credit to Ian Ker-Seymer ( @ianks ) for exposing this, writing tests (for the Ruby wrapper) and opening both the issue boazsegev/iodine#87 and the PR boazsegev/iodine#88.</p>
<p><strong>Fix</strong>: (<code>http</code>) requests will fail when the path contains a dangling <code>?</code> (empty query). Credit to @adam12 for exposing this and opening issue boazsegev/iodine#86.</p>
<h3 id="v-0-7-3">v. 0.7.3</h3>
<p><strong>Fix</strong>: (<code>http</code>) fixes a security issue in the static file name resolution logic, where a maliciously encoded request could invoke an arbitrary response.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixes an issue where setting a different value to <code>FIO_SLOWLORIS_LIMIT</code> was being ignored.</p>
<p><strong>Fix</strong>: (<code>fio</code>, <code>fiobj</code>) improved C++ compatibility. Credit to Joey (@joeyhoek) for PR #76.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixes an issue where timer cleanup wasn't performed after <code>fio_stop</code> (or SIGINT/SIGTERM). No a "clean slate" will be provided if <code>fio_start</code> is called more then once. Note: this may <strong>break previous behavior</strong>, which should be considered undocumented and unexpected behavior. (this fax <strong>may</strong> be deferred to version 0.8.x, still undecided). Credit to @fbrausse for opening issue #72. </p>
<p><strong>Fix</strong>: (<code>fio</code>) fixes an issue where timer cleanup would be performed after the <code>AT_EXIT</code> state callbacks. Now the timer cleanup callbacks will be performed <strong>before</strong> the <code>AT_EXIT</code> callback (as they should). (See issue #72).</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixes signal handler (re)establishment test to prevent recursive signal calling.</p>
<h3 id="v-0-7-2">v. 0.7.2</h3>
<p><strong>Fix</strong>: (<code>fio_tls</code>) fixes a memory leak in the trusted certificate chain. Credit to @fbrausse for opening PR #71.</p>
<p><strong>Fix</strong>: (<code>fio_tls</code>) fixes compilation / linking flags (including a bug caused by the <code>gcc</code> optimizer <code>-fipa-icf</code>) and improves support for OpenSSL using <code>pkg-config</code>. Credit to @fbrausse for PR #71.</p>
<p><strong>Fix</strong>: (<code>http1</code>) fixes a race-condition between the <code>on_ready</code> and <code>on_data</code> events, that could result in the <code>on_data</code> event being called twice instead of once (only possible with some clients). On multi-threaded workers, this could result in the CPU spinning while the task lock remains busy. Credit to Néstor Coppi (@Shelvak) for exposing the issue and providing an example application with detailed reports. Issue #75.</p>
<h3 id="v-0-7-1">v. 0.7.1</h3>
<p><strong>Security</strong>: a heap-overflow vulnerability was fixed in the WebSocket parser, which could have been triggered by a maliciously crafted message-header. Credit to Dane (4cad@silvertoque) for exposing this issue and providing a Python script demonstrating the attack. </p>
<h3 id="v-0-7-0">v. 0.7.0</h3>
<p>Stable API release. Future API updates will be wait for the 0.8.x release.</p>
<p><strong>Fix</strong>: (<code>fio</code>, <code>fiobj</code>) fixed some <code>gcc</code> and <code>clang</code> compatibility issues and warnings.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixed HTTP date format to force the day of the month to use two digits. Credit to @ianks (Ian Ker-Seymer) for exposing this issue (iodine#64).</p>
<p><strong>Compatibility</strong>: (<code>http</code>) updated time-zone compile-time tests with a safer fall-back.</p>
<h3 id="v-0-7-0-beta8">v. 0.7.0.beta8</h3>
<p><strong>Security</strong>: (<code>fio</code>) Slowloris mitigation is now part of the core library, where <code>FIO_SLOWLORIS_LIMIT</code> pending calls to <code>write</code> (currently 1,024 backlogged calls) will flag the connection as an attacker and either close the connection or ignore it. This protocol independent approach improves security.</p>
<p><strong>Security</strong>: (<code>http</code>) HTTP/1.1 client throttling - new requests will not be consumed until pending responses were sent. Since HTTP/1.1 is a response-request protocol, this protocol specific approach should protect the HTTP application against slow clients.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed fallback implementation for <code>fio_atomic_xchange</code> when missing atomic primitives in compiler (older compilers). Credit to @Low-power for identifying and fixing the issue (PR #55).</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed a possible unreleased lock when a memory allocation failed (no memory in the system). Credit to @Low-power for identifying and fixing the issue (PR #54).</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed the <code>fio_sock_sendfile_from_fd</code> fall-back for a missing <code>sendfile</code>. Credit to @Low-power for identifying and fixing the typo (PR #49).</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed <code>fio_pending</code> not decrementing packet count before reaching zero.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed logging message for overflowing log messages. Credit to @weskerfoot (Wesley Kerfoot) and @adam12 (Adam Daniels) for exposing the issue (issue iodine/#56).</p>
<p><strong>Fix</strong>: (<code>fio</code>, <code>fio_risky_hash</code>) Florian Weber (@Florianjw) <a href="https://www.reddit.com/r/crypto/comments/9kk5gl/break_my_ciphercollectionpost/eekxw2f/?context=3">exposed a byte ordering error (last 7 byte reading order) and took time challenge the algorithm</a>. The exposed errors were fixed and the exposed a possible attack on RiskyHash using a variation on a Meet-In-The-Middle attack, written by Hening Makholm (@hmakholm). This prompted an update and fixes to the function.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed <code>fio_str_resize</code> where data might be lost if data was written beyond the current size and the requested size is larger then the String's capacity (i.e., when <code>fio_str_resize</code> is (mis)used as an alternative to <code>fio_str_capa_assert</code>).</p>
<p><strong>Fix</strong>: (<code>json</code> / <code>redis</code>) fixed JSON formatting error caused by buffer reallocation when multiple (more then 48) escape sequences were detected. This issue also effected the Redis command callback handler (which was using JSON for IPC).</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed a potential double <code>free</code> call.</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed a recursive endless loop when converting nested Hash Tables to Redis objects (which normally wouldn't happen anyway, since they would be processed as JSON).</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed Redis reconnection. Address and port data was mistakingly written at the wrong address, causing it to be overwritten by incoming (non-pub/sub) data.</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed a race condition in the Redis reconnection logic which might have caused more then a single pub/sub connection to be established and the first pending command to be sent again.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fix capacity maximization log to accommodate issues where <code>getrlimit</code> would return a <code>rlim_max</code> that's too high for <code>rlim_cur</code> (macOS).</p>
<p><strong>Fix</strong>: (<code>fio</code>) fix uninitialized <code>kqueue</code> message in <code>fio_poll_remove_fd</code>.</p>
<p><strong>Fix</strong>: (<code>http</code>) possible fix for <code>http_connect</code>, where <code>host</code> header length might have been left uninitialized, resulting in possible errors.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed logging error message for long error messages.</p>
<p><strong>Update</strong>: (<code>fio</code> / <code>makefile</code>) improved detection for polling system call, <code>sendfile</code>, etc'.</p>
<p><strong>Update</strong>: (<code>fio</code>) improved signal handling. Signal handling now propagates to pre-existing signal handlers. In addition, the <code>fio_signal_handler_reset</code> function was made public, allowing facil.io signal handlers to be removed immediately following startup (using <code>fio_state_callback_add</code> with <code>FIO_CALL_PRE_START</code> to call <code>fio_signal_handler_reset</code>).</p>
<p><strong>Update</strong>: (<code>fio</code>) improved pub/sub memory usage to minimize message copying in cluster mode (same memory is used for IPC and local-process message publishing).</p>
<p><strong>Update</strong>: (<code>fio</code>) updated the non-cryptographic PRG algorithm for performance and speed. Now the <code>fio_rand</code> functions are modeled after the <code>xoroshiro128+</code> algorithm, with an automated re-seeding counter based on RiskyHash. This should improve performance for non cryptographic random requirements.</p>
<p><strong>Compatibility</strong>: (<code>fio</code>) mitigate undefined MAP_ANONYMOUS on MacOS <= 10.10. Credit to @xicreative (Evan Pavlica) for iodine/PR#61.</p>
<p><strong>Compatibility</strong>: (<code>fio</code>) various Solaris OS compatibility patches, courtesy of @Low-power (PR #52, #53).</p>
<h3 id="v-0-7-0-beta7">v. 0.7.0.beta7</h3>
<p><strong>BREAK</strong>: (<code>fio_tls</code>) breaking API changes to the SSL/TLS API... I know, I'm sorry, especially since there's a small and misleading change in argument ordering for <code>fio_tls_cert_add</code> and <code>fio_tls_new</code>... but if we don't fix the API now, before the 0.7.0 release, bad design might ruin our Wednesday meditation for all eternity.</p>
<p><strong>BREAK</strong>: (<code>http</code>) breaking API changes to <code>http_connect</code> were required in order to support Unix Socket connections in client mode.</p>
<p><strong>Deprecation</strong>: (<code>http</code>) deprecating the <code>http_url_parse</code> in favor of <code>fio_url_parse</code> (moved the function to the core library and rewrote it in part).</p>
<p><strong>Security</strong>: facil.io hash maps now limit the number of full-collisions allowed in a hash map. This mitigates the effects of hash flooding attacks. As a side effect, hash maps that are under attack might return false results for collision objects.</p>
<p><strong>Fix</strong>: (<code>websocket</code>) fixed an issue with the WebSocket parser where network byte order for long message lengths wasn't always respected and integer bit size was wrong for larger payloads. Credit to Marouane Elmidaoui (@moxgeek) for exposing the issue.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixed <code>udata</code> in WebSocket client callback for failed WebSocket client connections.</p>
<p><strong>Fix</strong>: (<code>fio</code>) logging message when listening to a Unix Socket.</p>
<p><strong>Fix</strong>: (<code>fio</code>) numerous minor design fixes, such as Big-Endian string memory access, allowing <code>fio.h</code> to be used as a header only library (requires <code>FIO_FORCE_MALLOC</code>) and other adjustments.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed unaligned memory access in SipHash implementation and added secret randomization for each application restart.</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed an issue where destroying the Redis engine and exiting pre-maturely, before running facio.io (<code>fio_start</code>), will cause a segmentation fault during cleanup.</p>
<p><strong>Update</strong>: (<code>fio</code>) added Risky Hash, for fast hashing of safe data. This is a fast hashing function (about twice as fast as the default SipHash1-3 secure function) that wasn't tested for security. For this reason it should be limited to internal / safe data, such as CLI argument names.</p>
<h3 id="v-0-7-0-beta6">v. 0.7.0.beta6</h3>
<p><strong>BREAK</strong>: (<code>fio_tls</code>) breaking API changes to the SSL/TLS API, adding support for password protected private key files. <em>Note</em>: The TLS API is still fragile and should only be considered stable once version 0.7.0 is released with SSL/TLS support.</p>
<p><strong>Security</strong> / <strong>Fix</strong>: (<code>http</code>) fixed an issue with the HTTP/1.1 parser, where maliciously crafted white-space data could cause a segmentation fault, resulting in a potential DoS.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed an issue exposed by implementing the TLS layer, where the highet <code>fd</code> for a connection that wasn't assigned a <code>protocol_s</code> object immediately after the connection was opened, might avoid timeout review or avoid cleanup during shutdown (which will be marked as a memory leak).</p>
<p><strong>Update</strong>: (<code>fio_tls</code>) added experimental support for OpenSSL. This was only partially tested and should be considered experimental.</p>
<p><strong>Update</strong>: (<code>fio</code>) added, the <code>fio_rw_hook_replace_unsafe</code> to allow r/w hook switching from within a r/w hook callback.</p>
<p><strong>Update</strong>: (<code>fio_cli</code>) a common user-error is a a missing <code>fio_cli_end</code>, resulting in a memory leak notification. Now facil.io protects against this common error by automatically calling <code>fio_cli_end</code> during the exit stage, if <code>fio_cli_start</code> was called.</p>
<h3 id="v-0-7-0-beta5">v. 0.7.0.beta5</h3>
<p><strong>Fix</strong>: (<code>fio_cli</code>) fixed an issue introduced in version 0.7.0.beta4, where <code>fio_cli_get_i</code> would dereference NULL if the value wasn't set. Now <code>fio_cli_get_i</code> returns zero (0) for missing values, as expected. Note: this related to the new hex and binary base support in command line numerals.</p>
<h3 id="v-0-7-0-beta4">v. 0.7.0.beta4</h3>
<p><strong>BREAK</strong>: (<code>fio_cli</code>) breaking API changes make this extension easier than ever to use... <em>I do apologize for this, but part of the reason 0.7.0 is still in beta is to test the API itself for ease of use and readability</em>.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed a minor memory leak in cluster mode, caused by the root process not freeing the hash map used for child process subscription monitoring.</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed superfluous and potentially erroneous pub/sub engine callback calls to <code>unsubscribe</code>, caused by (mistakingly) reporting filter channel closure.</p>
<p><strong>Fix</strong>: (<code>mustache</code>, <code>FIOBJ</code>) added support for dot notation in mustache templates.</p>
<p><strong>Fix</strong>: (<code>http/1.1</code>) avoid processing further requests if the connection was closed.</p>
<p><strong>Fix</strong>: (<code>fio_test</code>) fixed some memory leaks in the testing functions.</p>
<p><strong>Update</strong>: (<code>fio_cli</code>) stylize and beautify <code>FIO_CLI_PRINT_HEADER</code> lines.</p>
<p><strong>Update</strong>: (<code>fio</code>) updated the automatic concurrency calculations to leave resources for the system when a negative value is provided (was only available for worker count calculations, now available for thread count as well).</p>
<h3 id="v-0-7-0-beta3">v. 0.7.0.beta3</h3>
<p><strong>Fix</strong>: (<code>fio</code>) fixed superfluous <code>ping</code> events that might occur after a <code>fio_write</code> (but before the scheduled write actually occurred).</p>
<p><strong>Fix</strong>: (<code>mustache</code>) updated the mustache parser to fix an issue with template loading path names. The partial template path resolution logic was re-written, fixed and improved (I hope). This also adds support for text in mustache lambda, though not applicable when used with FIOBJ.</p>
<p><strong>Fix</strong>: (<code>fio</code>) prevent Read/Write Hooks from delaying <code>fio_force_close</code> when an error occures while polling a connection.</p>
<p><strong>Fix</strong>: (<code>fio</code>) deletes Unix sockets once done listening. Fixes an issue where the files would remain intact.</p>
<p><strong>Fix</strong>: (<code>fio</code>) replaced <code>fio_malloc</code> existing memory allocation / free-list implementation. This also fixes an issue with large memory pools being retained on multi-core systems with many reported CPU cores.</p>
<p><strong>Fix</strong>: (<code>fio</code>) the <code>FIO_FORCE_MALLOC</code> flag was fixed to accommodate for the fact that fio_malloc returns zeroed data (all bytes are set to zero) vs. the system's <code>malloc</code> which might return junk data.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixes a possible memory leak in <code>http_mimetype_register</code>, where clearing the registry wouldn't free the FIOBJ Strings.</p>
<p><strong>Update</strong>: (<code>cli</code>) updated handling of empty strings in CLI values by ignoring the argument rather than printing an error or experiencing an undefined value.</p>
<p><strong>Optimization</strong>: (<code>fio</code>) pub/sub channel names appear to be (often) objects with a long life-span. Hence, these objects now use <code>malloc</code> (instead of <code>fio_malloc</code>). Also, temporary allocations in <code>fio_subscribe</code> were removed.</p>
<p><strong>Optimization</strong>: (<code>fio</code>) pub/sub meta-data information and callbacks now use an Array (instead of link lists and a hash map). This should improve cache locality when setting and retrieving pub/sub meta-data.</p>
<p><strong>Optimization</strong>: (<code>fio</code>) added an urgent task queue for outbound IO, possibly improving protection against non-evented / blocking user code.</p>
<p><strong>Optimization</strong>: (<code>http</code>) WebSocket broadcasting optimizations are now automated.</p>
<h3 id="v-0-7-0-beta2">v. 0.7.0.beta2</h3>
<p><strong>Breaking Changes</strong>!</p>
<p>A lot of the code was re-written and re-organized, minimizing the name space used by the core library and consolidating the core library into a two file library (<code>fio.h</code> and <code>fio.c</code>).</p>
<p>This translated directly to <strong>breaking the API and ABI and bumping the version number</strong>.</p>
<p>This should make the library easier to copy and use as well as minimize possible name collisions (at the price of maintaining a couple of monolithic files as the core library).</p>
<p><strong>These are the main changes</strong>:</p>
<ul>
<li><p>Extracted the FIOBJ library from the core library, making it an add-on that could used by the extensions (such as the HTTP extension) rather than a core requirement.</p></li>
<li><p>Condensed the core library and it's namespace to two files (<code>fio.h</code> and <code>fio.c</code>) - replaced all <code>facil_</code> function names with <code>fio_</code> to accommodate the new namespace.</p>
<p>...why?</p>
<p>It's a choice to sacrifice ease of maintainability in favor of ease of use.</p>
<p>Although two files are more difficult to maintain than 10 files (assuming it's the same amount of code)... it seems that two files are easier for other developers to copy and paste into their projects.</p></li>
<li><p>Added poll support to allow for performance testing and CYGWIN compatibility. The system epoll/kqueue calls should perform better for higher loads, but now you can see for yourself.</p></li>
<li><p>Timers are now in user space, allowing for more timers and less kernel dependencies.</p></li>
<li><p>The <code>on_idle</code> and <code>on_finish</code> settings in <code>facil_run</code> (now <code>fio_start</code>) were removed, replaced by the more flexible <code>fio_state_callback_add</code> approach.</p></li>
<li><p>The <code>fio_listen</code> and <code>http_listen</code> functions now return the listening socket's <code>uuid</code> (much like <code>fio_connect</code> and <code>http_connect</code> did).</p></li>
<li><p>The Protocol's <code>on_shutdown</code> callback is now expected to return a <code>uint8_t</code>, hinting at a requested timeout before the socket is forcefully closed. A return value of 0 will indicate immediate socket closure with an 8 second timeout for outgoing buffer flushing.</p></li>
<li><p>The cluster messaging system and the Pub/Sub system were both refactored, <strong>the API changed</strong> and the FIOBJ dependency was removed. This change cascades to effect all the Pub/Sub system elements.</p></li>
<li><p>The Pub/Sub system's <code>use_pattern</code> was replaced with the optional callback argument <code>match</code> (a function pointer), allowing for custom pattern matching approaches (such as implementing NATs and RabbitMQ pattern matching). The previous glob matching approach (Redis compatible) is available using the provided <code>FIO_MATCH_GLOB</code> function pointer.</p></li>
<li><p>The WebSocket upgrade (<code>http_upgrade2ws</code>) now matches the SSE upgrade function (starts with the handle <code>http_s *</code> and named arguments come later).</p></li>
<li><p>The CLI API and implementation was completely rewritten. The new code is slightly more "monolithic" (one long function does most of the work), but should waste less memory with a simpler API (also got rid of some persistent data).</p></li>
<li><p>The Read/Write socket hooks were redesigned.</p></li>
<li><p>An SSL/TLS API stub was designed for SSL/TLS library abstraction (not implemented yet). This API is experimental and might change as I author the first SSL/TLS library wrappers (roadmap includes OpenSSL and BearSSL).</p></li>
</ul>
<p><strong>Update</strong>: (<code>fio_mem</code> => <code>fio.h</code>) updated the allocator defaults to lower the price of a longer life allocation. Reminder: the allocator was designed for short/medium allocation life-spans <u>or</u> large allocations (as they directly map to <code>mmap</code>). Now 16Kb will be considered a larger allocation and the price of holding on to memory is lower (less fragmentation).</p>
<p><strong>Fix</strong>: (<code>fio</code>) fixed a typo in the shutdown output. Credit to @bjeanes (Bo Jeanes) for the Iodine#39 PR.</p>
<p><strong>Feature</strong>: (<code>FIOBJ</code>) added <a href="http://mustache.github.io">mustache template support</a>.</p>
<p><strong>Logo</strong>: Logo created by @area55git (<a href="https://github.com/area55git">Area55</a>)</p>
<p><strong>Documentation</strong>: A new website!</p>
<h3 id="v-0-6-4">v. 0.6.4</h3>
<p><strong>Fix</strong>: (<code>sock</code>) fixed an issue where calls to <code>sock_write</code> could potentially add data to the outgoing queue even after <code>sock_close</code> in cases where the outgoing queue isn't empty.</p>
<p><strong>Fix</strong>: (<code>facil.io</code>) fixed a race condition between pre-scheduled tasks (<code>defer</code> calls) and the worker process initialization. The race condition might have resulted in some pre-scheduled tasks not running on all the workers.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixed an issue with the HTTP request logging, where the peer address wasn't shown.</p>
<p><strong>Fix</strong>: (<code>websocket</code>) made sure that <code>on_ready</code> is never called before <code>on_open</code> returns.</p>
<p><strong>Fix</strong>: (<code>fio_mem</code>, <code>facil</code>, <code>http</code>) fixed compatibility issues with Alpine Linux distro and older OS X versions (< 10.12).</p>
<p><strong>Fix</strong>: (<code>http</code>) fixed the <code>http_date2rfc2109</code> method where a space wasn't written to the buffer after the month name (resulting in a junk byte).</p>
<p><strong>Fix</strong>: (<code>pubsub</code>) made sure that newly registered engines get the full list of existing subscriptions (no need to call <code>pubsub_engine_resubscribe</code>).</p>
<p><strong>Fix</strong>: (<code>facil</code>) possible fix for protocol attachment with <code>NULL</code> protocol.</p>
<h3 id="v-0-7-0-beta1">v. 0.7.0.beta1</h3>
<p><strong>(yanked)</strong></p>
<h3 id="v-0-6-3">v. 0.6.3</h3>
<p><strong>Fix</strong>: (<code>fio_hashmap</code> / <code>fiobj_hash</code>) fixed a possible issue that could occur when compacting a severely fragmented Hash (where the length of the new storage requirements is shorter than the fragmented ordered array of data).</p>
<p><strong>Fix</strong>: (<code>http</code> / <code>websocket</code>) fixed an issue where the WebSocket's <code>on_close</code> callback wouldn't be called if certain errors prevented the upgrade. Now the <code>on_close</code> callback is always called.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixed an issue where the Content-Type header might be missing when sending unrecognized files. Now an additional best attempt to detect the content type (this time using the URL instead of the file name) will be performed. If no content type is detected, the default RFC content type will be attached (<code>application/octet-stream</code>).</p>
<p><strong>Fix</strong>: (<code>http1_parser</code>) fixed a possible unaligned memory access concern.</p>
<p><strong>Fix</strong>: (<code>FIOBJ</code>) fixed compiler compatibility concerns with the <code>fiobj_num_new</code> logic, removing some possibly undefined behavior.</p>
<p><strong>Fix</strong>: (<code>facil</code>) a missing <code>on_data</code> protocol callback (missing during <code>facil_attach</code>) will now call <code>facil_quite</code>, preventing the event from firing endlessly.</p>
<p><strong>Update</strong>: (<code>http</code>) the <code>on_upgrade</code> callback now supports SSE connections with <code>sse</code> protocol identifier and the <code>http_upgrade2sse</code> function.</p>
<p><strong>Update</strong>: (<code>sock</code>) initial support for TCP Fast Open (TFO) when listening for connections.</p>
<h3 id="v-0-6-2">v. 0.6.2</h3>
<p>This version fixes a number of issues, including a serious issue that prevented sockets from fully flushing their buffer.</p>
<p>This version also improved the shutdown and hot restart logic and fixes numerous issues with cluster mode an pub/sub services.</p>
<p>It's recommended that all 0.6.0.beta, 0.6.0 and 0.6.1 upgrade to this version.</p>
<p><strong>Security</strong>: (<code>http1</code>) added a hard-coded limit on the number of headers allowed per request (regardless of size). <code>HTTP_MAX_HEADER_COUNT</code> defaults to 128, which should be enough by all accounts.</p>
<p><strong>Fix</strong>: (<code>pubsub</code>, <code>facil</code>, <code>redis-engine</code>) fixed numerous cluster and Pub/Sub issues, including support for new <code>on_startup</code> callback for <code>pubsub_engine_s</code> objects (to make handling <code>fork</code>s that much easier. This fixes a memory leak, a reference counting error that freed memory prematurely, message parsing errors on fragmented messages, an obsolete ping formatting error, and more.</p>
<p><strong>Fix</strong>: (<code>sock</code>, <code>facil</code>) fixed an issue where socket buffers wouldn't be completely cleared (the <code>on_ready</code> event wouldn't be properly re-armed). This was discovered as a serious issue and upgrading to 0.6.2 is recommended.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixed an HTTP status string output error, where status codes above 410 would degrade to status 500 (internal error) instead of printing the correct status string to the response.</p>
<p><strong>Fix</strong>: (<code>websockets</code>) fixed a missing "close" packet signal that should have been sent immediately after the user's <code>on_shutdown</code> callback.</p>
<p><strong>Fix</strong>: (<code>FIOBJ</code>) fixed the <code>fiobj_str_tmp</code> function to add thread safety (temp string should be stored in the thread's local storage, not globally accessible).</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed a race condition in the Redis engine that could prevent publishing connections from being established in worker processes.</p>
<p><strong>Fix</strong>: (<code>facil</code>) fixed an issue where <code>facil_attach</code> wouldn't call the <code>on_close</code> callback if the failure was due to the file descriptor being equal to -1.</p>
<p><strong>Fix</strong>: (<code>facil</code>) fixed a signaling issue where a <code>SIGUSR1</code> sent to a worker process might inadvertently shutdown the server instead or wind down the specific worker and re-spawn a new one.</p>
<p><strong>Fix</strong>: (<code>facil</code>) fixed a signal handling logic to make it async-safe, protecting it against possible deadlocks or cluster stream corruption.</p>
<p><strong>Update/Fix</strong>: (<code>facil</code>) the <code>on_data</code> event will no longer be fired for sockets that were flagged to be closed using <code>sock_close</code>.</p>
<p><strong>Update</strong>: (<code>FIOBJ</code>) updated the <code>fiobj_str_readfile</code> to allow for a negative <code>stat_at</code> position (calculated from the end of file of the file backwards).</p>
<p><strong>Update</strong>: (<code>facil</code>) strengthened the <code>on_shutdown</code> callback lock to prevent the <code>on_shutdown</code> callback from being called while the <code>on_data</code> callback (or other connection tasks) is running.</p>
<p><strong>Update</strong>: (<code>facil</code>) shutdown logic provides more time for socket buffers to flush (only when required).</p>
<h3 id="v-0-6-1">v. 0.6.1</h3>
<p><strong>Fix</strong>: (<code>pubsub</code>) fixed a possible issue where a channel name might be freed before it's callback is handled. This was overlooked during the Hash caching logic update that prevented key hashing when the last item of the ordered Hash is removed.</p>
<p><strong>Fix</strong>: (<code>pubsub</code>) pubsub will now compact the memory used for client and channel data if the storage becomes excessively fragmented.</p>
<p><strong>Fix</strong>: (<code>hashmap</code>) fixed a possible memory reading issue that could occur when a Hash contains only one object and that object is removed (causing a memory read into the location just before the Hash map's address).</p>
<p><strong>Fix</strong>: (<code>defer</code>) defer now prefers the statically allocated buffer over the dynamically allocated buffer when all tasks have completed, preventing the last allocated buffer from leaking during the shutdown stage.</p>
<p><strong>Fix</strong>: (<code>websocket</code>) subscriptions created during the on_close callback (besides indicating that the API was being abused) are now properly removed.</p>
<h3 id="v-0-6-0">v. 0.6.0</h3>
<p>Version 0.6.0 is a major release, changing much of the extension API (HTTP, pub/sub, CLI) and some of the core API (i.e., moving the evio polling from level-triggered to one-shot polling, a rewrite to the facil.io dynamic object types FIOBJ, and more).</p>
<p>The following updates are included in this release (in addition to the beta updates):</p>
<p><strong>Fix</strong>: (<code>pubsub</code>) Fixed an issue where deferred pub/sub messages would have <code>udata2</code> set to <code>udata1</code> instead of the actual correct value.</p>
<p><strong>Fix</strong>: (<code>facil</code>) Fixed the <code>facil_is_running()</code> function, which could crash if facil.io wasn't initialized before the function was called.</p>
<p><strong>Fix</strong>: (<code>facil</code>) Fix CPU limit detection. Negative values are now meaningful (fraction of CPU cores, so -2 == cores/2). Zero values are replaced by facil.io.</p>
<p><strong>Update</strong>: (<code>facil</code>) Hot restart is now available for cluster mode. By sending the <code>SIGUSR1</code> signal to the program, facil.io will shutdown any worker processes and re-spawn new workers, allowing for a hot restart feature. Disable using <code>FACIL_DISABLE_HOT_RESTART</code></p>
<p><strong>Update</strong>: (<code>facil</code>) Dedicated system mode can be toggled by setting the <code>FIO_DEDICATED_SYSTEM</code> macro during compile time. When <code>FIO_DEDICATED_SYSTEM</code> is set, facil.io will assume all the CPU cores are available and it will activate threads sooner. When <code>FIO_DEDICATED_SYSTEM</code> is defined as 0, facil.io will limit thread to protect against slow user code (rather than attempt concurrent IO).</p>
<p><strong>Update</strong>: (<code>fio_mem</code>) replaced the double linked list logic with a single linked list to make the library more independent as well as reduce some operations.</p>
<p>As well as some refactoring and minor adjustments.</p>
<h3 id="v-0-6-0-beta-8">v. 0.6.0.beta.8</h3>
<p><strong>Fix</strong>: (<code>defer</code>) the <code>defer_free_thread</code> symbol is now correctly marked as weak, allowing the function to be overridden.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixes an issue where cookies without an explicit age would be marked for immediate deletion (instead of the expected "session" lifetime).</p>
<p><strong>Fix</strong>: (<code>http</code>) fixes a potential issue where a missing or corrupt <code>accept-encoding</code> header could cause a segmentation fault.</p>
<p><strong>Fix</strong>: (<code>http</code>) fixes an issue where a cookie encoding errors would reported repeatedly.</p>
<p><strong>Fix</strong>: (<code>fio_hash</code>) fixes an issue where resubmitting a removed object wouldn't increase the object count.</p>
<p><strong>Fix</strong>: (<code>fiobj</code>) fixes an issue where testing the type of specific FIOBJ_T_NUMBER objects using <code>FIOBJ_TYPE_IS</code> would return a false positive for the types FIOBJ_T_HASH or FIOBJ_T_STRING.</p>
<p><strong>Update</strong>: Added an experimental custom memory allocator (<code>fio_mem.h</code>) optimized for small concurrent short-lived allocations (anything over 16Kb and reallocations start to take a toll). It can replace the system's <code>malloc</code> function family when <code>FIO_OVERRIDE_MALLOC</code> is defined. To use <code>tcmalloc</code> or <code>jemalloc</code>, define <code>FIO_FORCE_MALLOC</code> to prevent <code>fio_mem</code> from compiling.</p>
<p><strong>Update</strong>: (<code>http</code>) added cookie parsing.</p>
<p><strong>Update</strong>: minor optimizations, <code>fio_malloc</code> incorporation and documentation updates.</p>
<h3 id="v-0-6-0-beta-7">v. 0.6.0.beta.7</h3>
<p><strong>Fix</strong>: (<code>websockets</code>) fixed an issue with client pinging would break the protocol in a way that would result in either loss of data or disconnections.</p>
<p><strong>Fix</strong>: (<code>websockets</code>) removed the debugging ping (3 seconds interval ping) from the Websocket client. Pings can be sent manually or by setting the connection's timeout using <code>facil_set_timeout</code>.</p>
<p><strong>Fix</strong>: (<code>websockets</code>) made sure the client mask is never zero by setting a few non-random bits.</p>
<p><strong>Fix</strong>: (<code>redis</code>) fixed an issue where the command queue (for busy pipelined Redis commands and for reconnection) would send the last message repeatedly instead of sending the messages in the queue.</p>
<p><strong>Fix</strong>: (<code>facil</code>) Fixed a possible memory leak related to <code>facil_connect</code> and failed connections to localhost. Improved process exit cleanup.</p>
<p><strong>Fix</strong>: (<code>pubsub</code>) improved process exit cleanup.</p>
<p><strong>Fix</strong>: (<code>fio_cli</code>) fixed text coloring on terminal output.</p>
<p><strong>Fix</strong>: (<code>fio_hash</code>) fixed looping logic to remove the need for the "data-end" marker optimizing allocations in a very small way.</p>
<p><strong>Update</strong>: (<code>websockets</code>) added a client example using the terminal IO for Websocket text communication.</p>
<h3 id="v-0-6-0-beta-6">v. 0.6.0.beta.6</h3>
<p>This beta release is a performance oriented release and includes mostly performance related changes.</p>
<p>This release updates some default values to make them more reasonable for common use cases and to help minimize memory consumption.</p>
<p>These values, such as the <code>LIB_SOCK_MAX_CAPACITY</code>, <code>FIO_HASH_INITIAL_CAPACITY</code> and the <code>FIOBJ_ARRAY_DEFAULT_CAPA</code> values, can be updated during compile time.</p>
<p>Some of these default values can be bypassed during runtime by using specific function calls (such as <code>fio_hash_new2</code>).</p>
<p>Other notable performance changes include the short string hash cashing (shortening the FIOBJ short-string capacity in exchange for reducing <code>fio_siphash</code> calls).</p>
<p>These are lessons learned from the TechEmpower benchmarks... although they will not be reflected in the Round 15 results.</p>
<h3 id="v-0-6-0-beta-5">v. 0.6.0.beta.5</h3>
<p>Released fixes for issues related to the <a href="https://github.com/TechEmpower/FrameworkBenchmarks">TechEmpower Framework Benchmarks</a> 80 core startup.</p>
<p><strong>Fix</strong>: fixed error handling during cluster mode startup, making sure facil.io fails to start.</p>
<p><strong>Update</strong>: capped maximum core detection value to 120 cores. Any value larger than 120 will raise a warning and the cap (120) will be used.</p>
<h3 id="v-0-6-0-beta-4">v. 0.6.0.beta.4</h3>
<p>Released after stress testing and memory leakage testing.</p>
<h3 id="v-0-6-0-beta-3">v. 0.6.0.beta.3</h3>
<p><strong>Breaking Change</strong>: (<code>websockets</code>) the websocket <code>on_close</code> callback signature had changed to allow it to be called on connection/upgrade failures as well (easier <code>udata</code> cleanup).</p>
<p><strong>Fix</strong> (<code>facil</code>): fixes an issue introduced in the beta.2 version, where deferred events that where scheduled before a call to <code>facil_run</code> would only be called for the parent process. Now these events would perform as intended (once in the root process and once in each worker process).</p>
<p><strong>Fix</strong> (<code>facil</code>): updates the logical assumption about open connections, to make sure any open connections are closed when re-spawning a child worker. This shift the connection assumption from unsafe (forked connections should be closed by extensions) to safe (reconnection should be handled by extension). This change should effect internal extensions only, since active connections aren't handled by the root process in clustered mode.</p>
<p><strong>Change</strong> (<code>websocket</code>): the protocol is now more forgiving in cases where clients don't mask empty messages.</p>
<p><strong>Feature</strong> (<code>websockets</code>): A simple and easy Websocket client using <code>websocket_connect</code> as well as support for more complex clients (with authentication logic etc') using a combination of the <code>http_connect</code> and <code>http_upgrade2ws</code> functions.</p>
<p><strong>Minor</strong>: some changes to the inner HTTP logic, fixed some error messages, and other minor updates.</p>
<h3 id="v-0-6-0-beta-2">v. 0.6.0.beta.2</h3>
<p>Version 0.6.0 is a major release, changing much of the extension API (HTTP, pub/sub, CLI) and some of the core API (i.e., moving the <code>evio</code> polling to One-Shot polling).</p>
<p>In this beta 2 release:</p>
<p><strong>Fix</strong> (<code>facil</code>): fixes an issue that could occur when forking a large number of processes, where cluster connection locks would remain locked, causing the cluster connections to spin the CPU and prevent shutdown.</p>
<p><strong>Fix</strong> (<code>redis</code>, <code>pubsub</code>, <code>evio</code>): fixes for the internal Redis engine. There was a connection re-establishing error related to updates in the new <code>evio</code> event logic.</p>
<p><strong>Update</strong>: (<code>http</code>) Added experimental query parsing helpers that perform nested parameter name resolution (i.e. <code>named_hash[named_array][]=value</code>). Logic might change as performance considerations apply. I'd love to read your feedback on this feature.</p>
<p><strong>Update</strong>: (<code>facil</code>) Simplified the child worker sentinel observation logic, to use threads instead of IPC.</p>
<h3 id="v-0-6-0-beta">v. 0.6.0.beta</h3>
<p>Version 0.6.0 is a major release, changing much of the extension API (HTTP, pub/sub, CLI) and some of the core API (i.e., moving the <code>evio</code> polling to One-Shot polling).</p>
<p>In this beta 1 release:</p>
<p><strong>Fix</strong> (<code>http</code>): fixed an issue where receiving the same header name more than once would fail to convert the header value into an array of values.</p>
<p><strong>Minor fixes</strong>: more error handling, more tests, fixed <code>fiobj_iseq</code> to test hash keys as well as objects. The <code>fio_hashmap.h</code> key caching for removed objects is cleared when hash is empty (i.e, if it's empty, it's really empty).</p>
<p><strong>Performance</strong> minor improvements. For example, Header Hash Maps are now cleared and reused by HTTP/1.1 during keep-alive (instead of deallocated and reallocated).</p>
<h3 id="v-0-6-0-dev">v. 0.6.0.dev</h3>
<p>This is a major release, changing much of the extension API (HTTP, pub/sub, CLI) and some of the core API (i.e., moving the <code>evio</code> polling to One-Shot polling).</p>
<p>Migration isn't difficult, but is not transparent either.</p>
<p><strong>Fix</strong> (backported): (<code>websocket_parser</code>) The websocket parser had a memory offset and alignment handling issue in it's unmasking (XOR) logic and the new memory alignment protection code. The issue would impact the parser in rare occasions when multiple messages where pipelined in the internal buffer and their length produced an odd alignment (the issue would occur with very fast clients, or a very stressed server).</p>
<p><strong>Note About Fixes</strong>:</p>
<ul>
<li> I simply rewrote much of the code to know if the issues I fixed were present in the 0.5.x version or not.</li>
</ul>
<p>I believe some things work better. Some of the locking concerns will have less contention and I think I fixed some issues in the <code>fiobj</code> core types as well as the <code>http</code> extension.</p>
<p>However, experience tells me a new major release (0.6.0) is always more fragile than a patch release. I did my best to test the new code, but experience tells me my tests are often as buggy as the code they test.</p>
<p>Anyway, I'm releasing 0.6.0 knowing it works better than the 0.5.8 version, but also knowing it wasn't battle tested just yet.</p>
<p><strong>Changes!</strong>: (<code>fiobj</code> / facil.io objects):</p>
<ul>
<li><p>Major API changes.</p>
<p>The facil.io dynamic type library moved closer to facil.io's core, integrating itself into the HTTP request/response handling, the Pub/Sub engine, the Websocket internal buffer and practically every aspect of the library.</p>
<p>This required some simplification of the <code>fiobj</code> and making sure future changes would require less of a migration process.</p></li>
<li><p>The Symbol and Couplet types were removed, along with nesting protection support (which nobody seemed to use anyway).</p></li>
<li><p>We're back to static typing with <code>enum</code>, using macros and inline functions for type identification (better performance at the expense of making extendability somewhat harder).</p></li>
<li><p>Hashes are now 100% collision resistant and have improved memory locality, at the expense of using more memory and performing calling <code>memcmp</code> (this can be avoided when seeking / removing / deleting items, but not when overwriting items).</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>http</code>):</p>
<ul>
<li><p>The HTTP API and engine was completely re-written (except the HTTP/1.1 parser), both to support future client mode (including chunked encoding for trailing headers) and to make routing and request parsing easier.</p></li>
<li><p>The updates to the HTTP API might result in decreased performance during the HTTP request reading due to the need to allocate resources and possibly copy some of the data into dynamic storage... For example, header Hash Tables replaced header Arrays, improving lookup times and increasing creation time. </p></li>
<li><p>The HTTP parser now breaks down long URI schemes into a short URI + <code>host</code> header (which might become an array if it's included anyway).</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>websocket</code>):</p>
<ul>
<li><p>The Websocket API includes numerous breaking changes, not least is the pub/sub API rewrite that now leverages <code>FIOBJ</code> Strings / Symbols.</p></li>
<li><p><code>websocket_write_each</code> was deprecated (favoring a pub/sub only design).</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>pubsub</code>):</p>
<ul>
<li><p>The <code>pubsub</code> API was redesigned after re-evaluating the function of a pub/sub engine and in order to take advantage of the <code>FIOBJ</code> type system.</p></li>
<li><p>Channel names now use a hash map with collision protection (using <code>memcmp</code> to compare channel names). The means that the 4 but trie is no longer in use and will be deprecated.</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>redis</code>):</p>
<ul>
<li>The <code>redis_engine</code> was rewritten, along with the RESP parser, to reflect the changes in the new <code>pubsub</code> service and to remove obsolete code.</li>
</ul>
<p><strong>Changes!</strong>: (<code>facil</code>):</p>
<ul>
<li><p>Slight API changes:</p>
<ul>
<li><code>facil_last_tick</code> now returns <code>struct timespec</code> instead of <code>time_t</code>, allowing for more accurate time stamping.</li>
<li><code>facil_cluster_send</code> and <code>facil_cluster_set_handler</code> were redesigned to reflect the new cluster engine (now using Unix Sockets instead of pipes).</li>
</ul></li>
<li><p>Internal updates to accommodate changes to other libraries.</p></li>
<li><p>Cluster mode now behaves as sentinel, re-spawning any crashed worker processes (except in DEBUG mode).</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>evio</code>):</p>
<ul>
<li><p>the evented IO library was redesigned for <strong>one-shot</strong> notifications, requiring a call to <code>evio_add</code> or <code>evio_set_timer</code> in order to receive future notifications.</p>
<p>This was a significant change in behavior and the changes to the API (causing backwards incompatibility) were intentional.</p></li>
<li><p>the code was refactored to separate system specific logic into different files. making it easier to support more systems in the future.</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>sock</code>):</p>
<ul>
<li><p>the socket library now supports automatic Unix detection (set <code>port</code> to NULL and provide a valid Unix socket path in the <code>address</code> field).</p></li>
<li><p>the socket library's Read/Write hooks API was revised, separating the function pointers from the user data. At server loads over 25%, this decreases the memory footprint.</p></li>
<li><p>the socket library's packet buffer API was deprecated and all <code>sock_write2(...)</code> operations take ownership of the memory/file (enforce <code>move</code>).</p></li>
<li><p>The internal engine was updated, removing pre-allocated packet buffers altogether and enabling packet header allocation using <code>malloc</code>, which introduces a significant changes to the internal behavior, possibly effecting embedded systems.</p></li>
</ul>
<p><strong>Changes!</strong>: (<code>defer</code>):</p>
<ul>
<li><p>Removed forking from the defer library, moving the <code>fork</code> logic into the main <code>facil</code> source code.</p></li>
<li><p>Defer thread pools and now include two weak functions that allow for customized thread scheduling (wakeup/wait). These are overwritten by facil.io (in <code>facil.c</code>).</p>
<p>By default, defer will use <code>nanosleep</code>.</p></li>
</ul>
<p><strong>Refactoring</strong>: (<code>fiobj</code>) moved the underlying Dynamic Array and Hash Table logic into single file libraries that support <code>void *</code> pointers, allowing the same logic to be used for any C object collection (as well as the facil.io objects).</p>
<hr>
<h3 id="ver-0-5-10-backported">Ver. 0.5.10 (backported)</h3>
<p><strong>Fix</strong> (backported): (<code>facil</code> / <code>pubsub</code>) fixed an issue where cluster messages would be corrupted when passed in high succession. Credit to Dmitry Davydov (@haukot) for exposing this issue through the Iodine server implementation (the Ruby port).</p>
<p>It should be noted that this doesn't fix the core weakness related to large cluster or pub/sub messages, which is caused by a design weakness in the <code>pipe</code> implementation (in some kernels).</p>
<p>The only solution for large message corruption is to use the new pub/sub engine introduced in the facil.io 0.6.x release branch, which utilizes Unix Sockets instead of pipes.</p>
<h3 id="ver-0-5-9-backported">Ver. 0.5.9 (backported)</h3>
<p><strong>Fix</strong> (backported from 0.6.0): (<code>websocket_parser</code>) The websocket parser had a memory offset and alignment handling issue in it's unmasking (XOR) logic and the new memory alignment protection code. The issue would impact the parser in rare occasions when multiple messages where pipelined in the internal buffer and their length produced an odd alignment (the issue would occur with very fast clients, or a very stressed server).</p>
<h3 id="ver-0-5-8">Ver. 0.5.8</h3>
<p><strong>Fix</strong>: (<code>defer</code>, <code>fiobj</code>) fix Linux compatibility concerns (when using GCC). Credit goes to @kotocom for opening issue #23.</p>
<h3 id="ver-0-5-7">Ver. 0.5.7</h3>
<p><strong>Fix</strong>: (<code>defer</code>) fixes the non-debug version of the new (v.0.5.6) defer, which didn't define some debug macros.</p>
<p><strong>Updates</strong>: minor updates to the boilerplate documentation and the "new application" creation process.</p>
<h3 id="ver-0-5-6-yanked">Ver. 0.5.6 (yanked)</h3>
<p><strong>Fix</strong>: Added <code>cmake_minimum_required</code> and related CMake fixes to the CMake file and generator. Credit to David Morán (@david-moran) for <a href="https://github.com/boazsegev/facil.io/pull/22">PR #22</a> fixing the CMakelist.txt.</p>
<p><strong>Compatibility</strong>: (<code>websocket_parser</code>) removed unaligned memory access from the XOR logic in the parser, making it more compatible with older CPU systems that don't support unaligned memory access or 64 bit word lengths.</p>
<p><strong>Optimization</strong>: (<code>defer</code>) rewrote the data structure to use a hybrid cyclic buffer and linked list for the task queue (instead of a simple linked list), optimizing locality and minimizing memory allocations.</p>
<p><strong>Misc</strong>: minor updates and tweaks, such as adding the <code>fiobj_ary2prt</code> function for operations such as quick sort, updating some documentation etc'.</p>
<h3 id="ver-0-5-5">Ver. 0.5.5</h3>
<p><strong>Fix</strong>: (<code>fiobj</code>) fixed an issue #21, where <code>gcc</code> would complain about overwriting the <code>fio_cstr_s</code> struct due to <code>const</code> members. Credit to @vit1251 for exposing this issue.</p>
<p><strong>Fix</strong>: (<code>fiobj</code>) fixed NULL pointer testing for <code>fiobj_free(NULL)</code>.</p>
<p><strong>Compatibility</strong>: (<code>gcc-6</code>) Fix some compatibility concerns with <code>gcc</code> version 6, as well as some warnings that were exposed when testing with <code>gcc</code>.</p>
<p><strong>Optimization</strong>: (<code>fiobj</code>) optimized the JSON parsing memory allocations as well as fixed some of the function declarations to add the <code>const</code> keyword where relevant.</p>
<h3 id="ver-0-5-4">Ver. 0.5.4</h3>
<p>I've been making so many changes, it took me a while.</p>
<p>This version includes all the updates in the unreleased version 0.5.3 as well as some extra work.</p>
<p>The new HTTP/1.1 and Websocket parsers have been debugged and tested in the Iodine Ruby server, the dynamic type system (<code>fiobj_s</code>) will be updated to revision 2 in this release...</p>
<p><strong>Change/Update</strong>: (<code>fiobj</code>) The dynamic type library was redesigned to make it extendable. This means that code that used type testing using a <code>switch</code> statement needs to be rewritten.</p>
<p><strong>Fix</strong>: (<code>websocket</code>) issues with the new websocket parser were fixed. Credit to Tom Lahti (@uidzip) for exposing the issues.</p>
<h3 id="ver-0-5-3-unreleased-included-in-0-5-4">Ver. 0.5.3 (unreleased, included in 0.5.4)</h3>
<p><strong>Change</strong>: minor changes to the versioning scheme removed some version MACROS... this isn't API related, so I don't consider it a breaking change, but it might effect code that relied too much on internal workings. The only valid version macros are the <code>FACIL_VERSION_*</code> macros, in the <code>facil.h</code> header.</p>
<p><strong>Change</strong>: (<code>http</code>) the HTTP/1.x parser was re-written and replaced. It should perform the same, while being easier to maintain. Also, the new parser could potentially be used to author an HTTP client.</p>
<p><strong>Change</strong>: (<code>websocket</code>) the Websocket parser was re-written and replaced, decoupling the parser and message wrapper from the IO layer. Performance might slightly improve, but should mostly remain the same. The new code is easier to maintain and easier to port to other implementations. Also, the new parser supports a client mode (message masking).</p>
<p><strong>Fix</strong>: (<code>websocket</code>) fix #16, where a client's first message could have been lost due to long <code>on_open</code> processing times. This was fixed by fragmenting the <code>upgrade</code> event into two events, adding the <code>facil_attach_locked</code> feature and attaching the new protocol before sending the response. Credit to @madsheep and @nilclass for exposing the issue and tracking it down to the <code>on_open</code> callbacks.</p>
<p><strong>Fix</strong>: (<code>sock</code>) sockets created using the TCP/IP <code>sock</code> library now use <code>TCP_NODELAY</code> as the new default. This shouldn't be considered a breaking change as much as it should be considered a fix.</p>
<p><strong>Fix</strong>: (<code>http1</code>) HTTP/1.x is now more fragmented, avoiding a <code>read</code> loop to allow for mid-stream / mid-processing protocol upgrades. This also fixes #16 at it's root (besides the improved <code>websocket</code> callback handling).</p>
<p><strong>Fix</strong>: (<code>http1</code>) HTTP/1.x now correctly initializes the <code>udata</code> pointer to NULL fore each new request.</p>
<p><strong>Fix</strong>: (<code>facil</code>) the <code>facil_run_every</code> function now correctly calls the <code>on_finish</code> callback when a timer initialization fails. This fixes a leak that could have occurred due to inconsistent API expectations. Workarounds written due to this issue should be removed.</p>
<p><strong>Fix</strong>: (<code>facil</code>) connection timeout is now correctly ignored for timers.</p>
<p><strong>Fix</strong>: (<code>defer</code>) a shutdown issue in <code>defer_perform_in_fork</code> was detected by @cdkrot and his fix was implemented.</p>
<p><strong>Fix</strong>: (<code>evio</code>) fixed an issue where the evented IO library failed to reset the state indicator after <code>evio_close</code> was called, causing some functions to believe that events are still processed. Now the <code>evio_isactive</code> will correctly indicate that the evented IO is inactive after <code>evio_close</code> was called.</p>
<p><strong>Fix</strong>: (<code>evio</code>) fixes an issue where <code>evio_add_timer</code> would fail with <code>EEXIST</code> instead of reporting success (this might be related to timer consolidation concerns in the Linux kernel).</p>
<p><strong>Fix</strong>: (<code>evio</code>) better timer <code>fd</code> creation compatibility with different Linux kernels.</p>
<p><strong>Fix</strong>: (documentation) credit to @cdkrot for reporting an outdated demo in the README.</p>
<p><strong>Fix</strong>: (linking) added the missing <code>-lm</code> linker flag for <code>gcc</code>/Linux (I was using <code>clang</code>, which automatically links to the math library, so I didn't notice this).</p>
<p><strong>Portability</strong>: added <code>extern "C"</code> directive for untested C++ support.</p>
<p><strong>Feature</strong>: 🎉 added a CLI helper service, allowing easy parsing and publishing of possible command line arguments.</p>
<p><strong>Feature</strong>: 🎉🎉 added a dynamic type library to <code>facil.io</code>'s core, making some common web related tasks easier to manage.</p>
<p><strong>Feature</strong>: 🎉🎉🎉 added native JSON support. JSON strings can be converted to <code>fiobj_s *</code> objects and <code>fiobj_s *</code> objects can be rendered as JSON! I'm hoping to get it <a href="https://github.com/miloyip/nativejson-benchmark/pull/92">benchmarked publicly</a>.</p>
<h3 id="ver-0-5-2">Ver. 0.5.2</h3>
<p><strong>Change</strong>: non-breaking changes to the folder structure are also reflected in the updated <code>makefile</code> and <code>.clang_complete</code>.</p>
<p><strong>Fix</strong>: (<code>defer</code>) fixed <code>SIGTERM</code> handling (signal was mistakingly filtered away).</p>
<p><strong>Fix</strong>: (<code>http_response</code>) fixed <code>http_response_sendfile2</code> where path concatenation occurred without a folder separator (<code>/</code>) and exclusively safe file paths were being ignored (the function assumed an unsafe path to be used, at least in part).</p>
<p><strong>Fix</strong>: minor fixes and documentation.</p>
<p><strong>Fix / Feature</strong>: (<code>facil</code>) sibling processes will now detect a sibling's death (caused by a crashed process) and shutdown.</p>
<p><strong>Feature</strong>: @benjcal suggested the script used to create new applications. The current version is a stand-in draft used for testing.</p>
<p><strong>Feature</strong>: temporary boiler plate code for a simple "hello world" HTTP application using the new application script (see the README). This is a temporary design to allow us to test the script's functionality and decide on the final boiler plate's design.</p>
<h3 id="ver-0-5-1">Ver. 0.5.1</h3>
<p><strong>Fix</strong>: (<code>sock</code>) Fixed an issue where <code>sock_flush</code> would always invoke <code>sock_touch</code>, even if no data was actually sent on the wire.</p>
<p><strong>Fix</strong>: (<code>sock</code>) fixed a possible issue with <code>sock_flush_strong</code> which might have caused the facil.io to hang.</p>
<p><strong>Fix</strong>: (<code>Websocket</code>) fixed an issue with fragmented pipelined Websocket messages.</p>
<p><strong>Feature</strong>: (<code>facil</code>) easily force an IO event, even if it did not occur, using <code>facil_force_event</code>.</p>
<h3 id="ver-0-5-0">Ver. 0.5.0</h3>
<p><strong>Braking changes</strong>: (<code>pubsub</code>) The API was changed / updated, making <code>pubsub_engine_s</code> objects easier to author and allowing allocations to be avoided by utilizing two <code>void * udata</code> fields... Since this is a breaking change, and following semantic versioning, the minor version is updated. I do wish I could have delayed the version bump, as the roadmap ahead is long, but it is what it is.</p>
<p><strong>Braking changes</strong>: (<code>facil</code>) Since the API is already changing a bit, I thought I'd clean it up a bit and have all the <code>on_X</code> flow events (<code>on_close</code>, <code>on_fail</code>, <code>on_start</code>...) share the same function signature where possible.</p>
<p><strong>Changes</strong>: (<code>facil</code>) Minor changes to the <code>fio_cluster_*</code> API now use signed message types. All negative <code>msg_type</code> values are reserved for internal use.</p>
<p><strong>Fix</strong>: plugging memory leaks while testing the system under very high stress.</p>
<p><strong>Fix</strong>: (<code>pubsub</code>, <code>fio_dict</code>) Fixed glob pattern matching... I hope. It seems to work fine, but I'm not sure it the algorithm matches the Redis implementation which is the de-facto standard for channel pattern matching.</p>
<p><strong>Security</strong>: (<code>http</code>) the HTTP parser now breaks pipelined HTTP requests into fragmented events, preventing an attacker from monopolizing requests through endless pipelining of requests that have a long processing time.</p>
<p><strong>Fix</strong>: (<code>http</code>) <code>http_listen</code> will now always <em>copy</em> the string for the <code>public_folder</code>, allowing dynamic strings to be safely used.</p>
<p><strong>Fix</strong>: (<code>http</code>) default error files weren't located due to missing <code>/</code> in name. Fixed by adjusting the requirement for the <code>/</code> to be more adaptive.</p>
<p><strong>Fix</strong>: (<code>http</code>) dates were off by 1 day. Now fixed.</p>
<p><strong>Fix</strong>: (<code>http1</code>) a minor issue in the <code>on_data</code> callback could have caused the parser to crash in rare cases of fragmented pipelined requests on slower connections. This is now fixed.</p>
<p><strong>Fix</strong>?: (<code>http</code>) When decoding the path or a request, the <code>+</code> sign is now left unencoded (correct behavior), trusting in better clients in this great jungle.</p>
<p><strong>Fix</strong>: (<code>facil</code>) <code>facil_defer</code> would leak memory if a connection was disconnected while a task was scheduled.</p>
<p><strong>Fix</strong>: (<code>facil</code>) <code>facil_connect</code> now correctly calls the <code>on_fail</code> callback even on immediate failures (i.e. when the function call was missing a target address and port).</p>
<p><strong>Fix</strong>: (<code>facil</code>) <code>facil_connect</code> can now be called before other socket events (protected form library initialization conflicts).</p>
<p><strong>Fix</strong>: (<code>facil</code>) <code>facil_listen</code> will now always <em>copy</em> the string for the <code>port</code>, allowing dynamic strings to be safely used when <code>FACIL_PRINT_STATE</code> is set.</p>
<p><strong>Fix</strong>: (<code>facil</code>) <code>facil_last_tick</code> would crash if called before the library was initialized during socket operations (<code>facil_listen</code>, <code>facil_attach</code>, etc')... now <code>facil_last_tick</code> falls back to <code>time()</code> if nothing happened yet.</p>
<p><strong>Fix</strong>: (<code>facil</code>) <code>.on_idle</code> now correctly checks for non networks events as well before the callback is called.</p>
<p><strong>Fix</strong>: (<code>defer</code>) A large enough (or fast enough) thread pool in a forked process would complete the existing tasks before the active flag was set, causing the facil.io reactor to be stranded in an unscheduled mode, as if expecting to exit. This is now fixed by setting a temporary flag pointer for the forked children, preventing a premature task cleanup.</p>
<p><strong>Changes</strong>: Major folder structure updates make development and support for CMake submodules easier. These changes should also make it easier to push PRs for by offering the <code>dev</code> folder for any localized testing prior to submitting the PR.</p>
<p><strong>Feature</strong>: (<code>websockets</code>) The websocket pub/sub support is here - supporting protocol tasks as well as direct client publishsing (and autu text/binary detection)! There are limits and high memory costs related to channel names, since <code>pubsub</code> uses a trie for absolute channel matching (i.e. channel name length should be short, definitely less than 1024Bytes).</p>
<p><strong>Feature</strong>: (<code>redis</code>) The websocket pub/sub support features a shiny new Redis engine to synchronize pub/sub across machines! ... I tested it as much as I could, but I know my tests are as buggy as my code, so please test before using.</p>
<p><strong>Feature</strong>: (<code>facil_listen</code>, <code>http_listen</code>) supports an optional <code>on_finish_rw</code> callback to clean-up the <code>rw_udata</code> object.</p>
<p><strong>Feature</strong>: (<code>pubsub</code>) channels now use the available <code>fio_dict_s</code> (trie) data store. The potential price of the larger data-structure is elevated by it's absolute protection against hash collisions. Also, I hope that since channels are more often searched than created, this should improve performance when searching for channels by both pattern and perfect match. I hope this combination of hash tables (for client lookup) and tries (for channel traversal) will provide the best balance between string matching, pattern matching, iterations and subscription management.</p>
<p><strong>Feature</strong>: (<code>http</code>) <code>http_listen</code> now supports an <code>on_finish</code> callback.</p>