2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
27#define LWS_RECOMMENDED_MIN_HEADER_SPACE 2048
30
31
32
36
37
38
39
43
44
45
46
47
48
49
50
51
52
53LWS_VISIBLE LWS_EXTERN
const char *
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74LWS_VISIBLE LWS_EXTERN
int
76 const char *other_headers,
int other_headers_len);
78LWS_VISIBLE LWS_EXTERN
int
122
123
124
125
126
127
128
129
138
156
157
158
159LWS_VISIBLE LWS_EXTERN
int
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
199
200
201
202
203
210
211
212
213
214
218#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_HTTP_HEADERS_ALL)
225#if defined(LWS_ROLE_WS) || defined(LWS_HTTP_HEADERS_ALL)
229#if defined(LWS_ROLE_WS) || defined(LWS_HTTP_HEADERS_ALL)
238#if defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
242#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_HTTP_HEADERS_ALL)
257#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
260#if defined(LWS_ROLE_WS) || defined(LWS_HTTP_HEADERS_ALL)
265#if defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
273#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
277#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
297#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
306#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
310#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
316#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_HTTP_HEADERS_ALL)
323#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_HTTP_HEADERS_ALL)
331#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS) || defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
335#if defined(LWS_ROLE_H2) || defined(LWS_HTTP_HEADERS_ALL)
344
361#if defined(LWS_WITH_CUSTOM_HEADERS) || defined(LWS_HTTP_HEADERS_ALL)
388
389
390
391
392LWS_VISIBLE LWS_EXTERN
const unsigned char *
396
397
398
399
400
401
402
403LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
404lws_hdr_total_length(
struct lws *wsi,
enum lws_token_indexes h);
407
408
409
410
411
412
413
414
415LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
416lws_hdr_fragment_length(
struct lws *wsi,
enum lws_token_indexes h,
420
421
422
423
424
425
426
427
428
429
430
431
432
433LWS_VISIBLE LWS_EXTERN
int
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453LWS_VISIBLE LWS_EXTERN
int
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473LWS_VISIBLE LWS_EXTERN
int
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494LWS_VISIBLE LWS_EXTERN
int
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515LWS_VISIBLE LWS_EXTERN
int
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539LWS_VISIBLE LWS_EXTERN
int
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559LWS_VISIBLE LWS_EXTERN
const char *
565
566
567
568
569
570
571
572
573
574
575
576
577
580#define LWSAHH_CODE_MASK ((1
<< 16
) - 1
)
581#define LWSAHH_FLAG_NO_SERVER_NAME (1
<< 30
)
584
585
586
587
588
589
590
591
592
593
594
595
596
597LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
598lws_add_http_header_status(
struct lws *wsi,
599 unsigned int code,
unsigned char **p,
602
603
604
605
606
607
608
609
610
611
612
613LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
614lws_add_http_header_by_name(
struct lws *wsi,
const unsigned char *name,
615 const unsigned char *value,
int length,
616 unsigned char **p,
unsigned char *end);
618
619
620
621
622
623
624
625
626
627
628
629
630LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
631lws_add_http_header_by_token(
struct lws *wsi,
enum lws_token_indexes token,
632 const unsigned char *value,
int length,
633 unsigned char **p,
unsigned char *end);
635
636
637
638
639
640
641
642
643
644LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
645lws_add_http_header_content_length(
struct lws *wsi,
646 lws_filepos_t content_length,
647 unsigned char **p,
unsigned char *end);
649
650
651
652
653
654
655
656
657LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
658lws_finalize_http_header(
struct lws *wsi,
unsigned char **p,
662
663
664
665
666
667
668
669
670
671
672LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
673lws_finalize_write_http_header(
struct lws *wsi,
unsigned char *start,
674 unsigned char **p,
unsigned char *end);
676#define LWS_ILLEGAL_HTTP_CONTENT_LEN ((lws_filepos_t)-1ll
)
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
704LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
705lws_add_http_common_headers(
struct lws *wsi,
unsigned int code,
706 const char *content_type, lws_filepos_t content_len,
707 unsigned char **p,
unsigned char *end);
722
723
724
725
726
727
728
729
730
731
732
734LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
735lws_http_get_uri_and_method(
struct lws *wsi,
char **puri_ptr,
int *puri_len);
740
741
742
743
744
745
746
747
751
752
753
754
755
756
757
758
759
760LWS_VISIBLE LWS_EXTERN
const char *
764
765
766
767
768
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784LWS_VISIBLE LWS_EXTERN
int
789
790
791
792
793
794
795
796
797
798LWS_VISIBLE LWS_EXTERN
int
802
803
804
805
806
807
808
809
810
811LWS_VISIBLE LWS_EXTERN
int
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832LWS_VISIBLE LWS_EXTERN
int
836
837
838
839
840
841
842
843
844LWS_VISIBLE LWS_EXTERN
int
846 const char *html_body);
849
850
851
852
853
854
855
856
857
858
859
860LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
861lws_http_redirect(
struct lws *wsi,
int code,
const unsigned char *loc,
int len,
862 unsigned char **p,
unsigned char *end);
865
866
867
868
869
870
871
872LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
873lws_http_transaction_completed(
struct lws *wsi);
876
877
878
879
880
881
882LWS_VISIBLE LWS_EXTERN
int
886
887
888
889
890
891
892
893LWS_VISIBLE LWS_EXTERN
int
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911LWS_VISIBLE LWS_EXTERN
int
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939LWS_VISIBLE LWS_EXTERN
int
941 unsigned char **p,
unsigned char *end,
char decomp);
944
945
946
947
948
949
950
951LWS_VISIBLE LWS_EXTERN
int
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971LWS_VISIBLE LWS_EXTERN
int
975
976
977
978
979
980
981
982#define lws_http_client_http_resp_is_error(code) (!(code < 400
))
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009#define LWS_H2_STREAM_SID -1
1010LWS_VISIBLE LWS_EXTERN
int
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025LWS_VISIBLE LWS_EXTERN
int
LWS_VISIBLE LWS_EXTERN const char * lws_get_mimetype(const char *file, const struct lws_http_mount *m)
LWS_VISIBLE LWS_EXTERN int lws_http_compression_apply(struct lws *wsi, const char *name, unsigned char **p, unsigned char *end, char decomp)
LWS_VISIBLE LWS_EXTERN int lws_http_mark_sse(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_http_date_parse_unix(const char *b, size_t len, time_t *t)
LWS_VISIBLE LWS_EXTERN int lws_serve_http_file_fragment(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_http_check_retry_after(struct lws *wsi, lws_usec_t *us_interval_in_out)
LWS_VISIBLE LWS_EXTERN int lws_chunked_html_process(struct lws_process_html_args *args, struct lws_process_html_state *s)
lws_process_html_state_cb replace
LWS_VISIBLE LWS_EXTERN int lws_h2_get_peer_txcredit_estimate(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_http_date_render_from_unix(char *buf, size_t len, const time_t *t)
LWS_VISIBLE LWS_EXTERN int lws_urldecode(char *string, const char *escaped, int len)
LWS_VISIBLE LWS_EXTERN const char * lws_urlencode(char *escaped, const char *string, int len)
LWS_VISIBLE LWS_EXTERN int lws_h2_update_peer_txcredit(struct lws *wsi, unsigned int sid, int bump)
LWS_VISIBLE LWS_EXTERN int lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type, const char *other_headers, int other_headers_len)
@ HTTP_STATUS_EXPECTATION_FAILED
@ HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE
@ HTTP_STATUS_NOT_ACCEPTABLE
@ HTTP_STATUS_REQ_URI_TOO_LONG
@ HTTP_STATUS_INTERNAL_SERVER_ERROR
@ HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE
@ HTTP_STATUS_REQUEST_TIMEOUT
@ HTTP_STATUS_PROXY_AUTH_REQUIRED
@ HTTP_STATUS_BAD_REQUEST
@ HTTP_STATUS_METHOD_NOT_ALLOWED
@ HTTP_STATUS_NOT_MODIFIED
@ HTTP_STATUS_MOVED_PERMANENTLY
@ HTTP_STATUS_PARTIAL_CONTENT
@ HTTP_STATUS_REQ_ENTITY_TOO_LARGE
@ HTTP_STATUS_SERVICE_UNAVAILABLE
@ HTTP_STATUS_LENGTH_REQUIRED
@ HTTP_STATUS_PRECONDITION_FAILED
@ HTTP_STATUS_BAD_GATEWAY
@ HTTP_STATUS_NOT_IMPLEMENTED
@ HTTP_STATUS_UNAUTHORIZED
@ HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED
@ HTTP_STATUS_GATEWAY_TIMEOUT
@ HTTP_STATUS_PAYMENT_REQUIRED
LWS_VISIBLE LWS_EXTERN int lws_return_http_status(struct lws *wsi, unsigned int code, const char *html_body)
LWS_VISIBLE LWS_EXTERN int lws_http_is_redirected_to_get(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_http_cookie_get(struct lws *wsi, const char *name, char *buf, size_t *max)
LWS_VISIBLE LWS_EXTERN int lws_http_headers_detach(struct lws *wsi)
const char *(* lws_process_html_state_cb)(void *data, int index)
LWS_VISIBLE LWS_EXTERN int lws_h2_client_stream_long_poll_rxonly(struct lws *wsi)