Commit graph

554 commits

Author SHA1 Message Date
Anonymous
13184f5f80
Return Server& from handler setters (#836)
* Update httplib.h

* Update httplib.h

* Update httplib.h

* Update httplib.h
2021-01-22 09:20:21 -05:00
Eric Lee
8d9a477edb
No content check (#823)
* No content check

* unit test for no content

* fixing merge conflict break

* oops during manual merge conflict
2021-01-13 17:51:40 -05:00
yhirose
f008fe4539
Added middleware support (#816) 2021-01-07 18:40:52 -05:00
yhirose
ddf41d29ef Added const *char and size_t interface 2021-01-06 22:39:58 -05:00
yhirose
3f88a46c4a Code format 2020-12-31 18:14:28 -05:00
yhirose
242706ea34 Fix #820 2020-12-31 18:14:05 -05:00
yhirose
a9f5f8683f Fixed warnings on Visual C++ 2020-12-31 11:35:11 -05:00
yhirose
60c2213893 Fix #817 2020-12-31 10:58:44 -05:00
yhirose
eb2d28bca2 Code cleanup 2020-12-31 10:37:06 -05:00
yhirose
2c07ec4600 Code cleanup 2020-12-29 09:39:19 -05:00
yhirose
871d8d67b0 Made Request paramater const in handle_file_request 2020-12-28 22:03:44 -05:00
yhirose
e9c6c6e609 Code format 2020-12-19 20:14:53 -05:00
yhirose
40db42108f Fixed problem with invalid requests including spaces in URL path 2020-12-19 12:03:08 -05:00
Jeremie Rahm
d0bd4afb0b
Ensure socket is closed after processing in SSLServer (#804) 2020-12-18 19:29:36 -05:00
Yuri Santos
78ea786abd
[PR] Special function to encode query params (#801)
* Special function to encode query params

* Fix #include <iomanip>

* Added unescaped charsets to encode_query_param

* Unit tests for encode_query_param
2020-12-18 17:51:11 -05:00
Anonymous
0cff3245df
Extend built-in extension MIME mapping (#799)
* Update README.md

* Update httplib.h

* Update httplib.h

* Update httplib.h

* Update httplib.h

* Remove duplicate cases

Someone left a bunch of duplicate cases, idiot, couldn't have been me.

* Reformat

Modify spacing and whatnot

* Update README.md
2020-12-18 09:32:19 -05:00
yhirose
0e3925db3f Fixed build error 2020-12-18 00:07:48 +00:00
yhirose
c9a13d214b Changed not to use string_view 2020-12-17 18:48:27 -05:00
yhirose
0954af2d4c Use user-defined literals for file extention match 2020-12-17 18:27:04 -05:00
yhirose
7c1c952f5a Don't allow invalid status code format (It sould be a three-digit code.) 2020-12-15 20:25:24 -05:00
yhirose
c1264bfedc Fix problem with mp4 w/ Range header 2020-12-14 22:41:05 -05:00
yhirose
eb240ad2e5 Code cleanup 2020-12-03 16:03:12 -05:00
yhirose
88c961f37e Removed std::atomic<Error> error_ 2020-12-01 15:17:34 +00:00
yhirose
5dd605d3a2 Fix #762 2020-11-30 21:49:31 -05:00
yhirose
615867322d Fixed build errors and apply clangformat 2020-11-29 12:29:18 -05:00
David Wu
02d3cd5909 Fix multiple threading bugs including #699 and #697 2020-11-29 12:29:15 -05:00
yhirose
a5c239c174 Fix #765 2020-11-21 16:35:31 -05:00
yhirose
c2afc5ca44 Added chunked content provider support on client 2020-11-21 08:46:50 -05:00
Unkorunk
b21dc8cbe0
Fix incorrect content_encoding for Brotli (#763) 2020-11-19 12:39:20 -05:00
372046933
e1133a2dcb
std::tolower is undefined if the argument's value is neither representable as unsigned char nor equal to EOF (#761)
Co-authored-by: taoxu <taoxu@bilibili.com>
2020-11-19 09:21:40 -05:00
yhirose
95d0b073bd Fix #754 2020-11-15 08:13:08 -05:00
vawen
9c7d841b37
Fix: #746 Compile error under VS2015 (#747)
Co-authored-by: jigarcia@vaxtor.es <jigarcia@vaxtor.es>
2020-11-10 08:41:53 -05:00
yhirose
f086bf5310 Fix #738 2020-11-08 18:16:23 -05:00
yhirose
6adf130bf3 Fix #739 2020-11-07 21:54:47 -05:00
yhirose
eb4b7c70a9 Fix #737 2020-11-07 09:33:22 -05:00
yhirose
84661ea6ed Refactoring 2020-11-05 07:06:53 -05:00
yhirose
041122908c Fix problem with invalid range 2020-11-05 00:20:59 -05:00
yhirose
726c64cf10 Code format 2020-11-05 00:20:59 -05:00
Omkar Jadhav
72b81badad
Fix issues reported by oss-fuzz (#729)
* Fix oss-fuzz issue #26529

* Add test for oss-fuzz issue  #26598

* Fix oss-fuzz issue  #26632

* Revert change and add new test cases
2020-11-03 11:36:02 -05:00
Daniel Ottiger
6e1879dfae
ssl-verify-host: fix verifying ip addresses containing zero's (#732)
* ssl-verify-host: fix verifying ip addresses containing zero's

If the subject alternate name contained an ip address with an zero
(like 10.42.0.1) it could not successfully verify.
It is because in c++ strings are null-terminated
and therefore strlen(name) would return a wrong result.
As I can not see why we can not trust the length returned by openssl,
lets drop this check.

* ssl-verify-host: add test case

lets try to validate against 127.0.0.1

Co-authored-by: Daniel Ottiger <daniel.ottiger@ch.schindler.com>
2020-11-02 20:27:34 -05:00
miketsts
eb1d2e04bc
SSL_connect and SSL_accept in non-blocking mode (#728)
SSL connection is performed in two steps:
First, a regular socket connection is established.
Then, SSL_connect/SSL_accept is called to establish SSL handshake.

If a network problem occurs during the second stage, SSL_connect on
the client may hang indefinitely.

The non-blocking mode solves this problem.

Co-authored-by: Michael Tseitlin <michael.tseitlin@concertio.com>
2020-11-02 17:05:08 -05:00
yhirose
c909ffa758 Fix #731 2020-11-01 21:03:47 -05:00
yhirose
8b1b31ac20 Fix #723 2020-10-27 20:32:19 -04:00
yhirose
953600c177 Fixed compiler error for old compiler. 2020-10-27 12:23:37 -04:00
yhirose
536e7eb7f2 Revert "Fix #697". (It broke unit test...)
This reverts commit 6d66721ba1.
2020-10-25 20:22:39 -04:00
yhirose
6d66721ba1 Fix #697 2020-10-25 16:55:54 -04:00
yhirose
3b29cd0bdc Fix #698 2020-10-25 12:14:54 -04:00
yhirose
109b624dfe
Fix #708 (#713)
* Fix #708

* Rename ContentReceiver2 to ContentReceiverWithProgress
2020-10-22 11:48:43 -04:00
yhirose
a50b7591ca Fix #714 2020-10-21 13:02:33 -04:00
yhirose
bf8fc11b53 Code cleanup 2020-10-20 21:24:47 -04:00