yhirose
dfc94f2cab
Code cleanup
2019-05-07 21:46:15 -04:00
yhirose
3f42804a4f
Wildcard support for verifying server certificate. fix #87
2019-05-07 21:40:03 -04:00
yhirose
82193b9489
Code clieanup
2019-05-07 20:11:45 -04:00
yhirose
097c61b871
Comment out debug print
2019-05-07 16:57:27 -04:00
yhirose
b08e22ab00
Changed the server certificate verification API
2019-05-07 16:54:51 -04:00
yhirose
03a577cccd
Fixed huge payload problem on Windows
2019-05-07 16:41:50 -04:00
yhirose
0bd9737c88
Fix #87
2019-05-07 16:41:33 -04:00
yhirose
dd901126a7
Fix #146
2019-05-05 13:31:42 -04:00
yhirose
744e8e7071
Fix #144
2019-04-12 23:34:27 -04:00
yhirose
8af85019dc
Removed get_header_value_int and use uint64_t for the return value of get_header_value_uint64
2019-04-12 17:22:39 -04:00
Manny
07ed076499
BUGFIX: crash when "content-length" > max_int
2019-04-12 12:16:32 +02:00
Yuji Hirose
5d082f1da4
Apply clangformat
2019-04-11 08:13:31 -04:00
yhirose
a91a0b7dbf
Fix #140
2019-04-10 12:21:42 -04:00
yhirose
8483e5931f
Fix #136
2019-03-28 19:56:32 -04:00
batist73
90e699161a
Add WinSock2 dependency
2019-03-27 19:55:06 +03:00
Yuji Hirose
96cacd24f9
Fixed #134
2019-03-12 08:49:08 -04:00
archivaldo
c5264cea9c
Fix coding style
2019-03-07 19:03:18 -03:00
archivaldo
dedcc43216
small fix to allow fronting
2019-03-07 16:40:19 -03:00
Whitetiger
787761a7bf
Fix build error with Boost::asio
2019-02-25 13:09:31 -05:00
Geraldo Intmain
774c27e690
Encoding LF and CR
2019-02-24 17:15:27 -03:00
yhirose
7b3f6db70b
Fix #128
2019-02-22 08:52:38 -05:00
Yuji Hirose
d3eb88b740
Fix #126
2019-02-13 08:14:58 -05:00
Constantin
28ad0ca68d
Fixed #124
2019-01-30 12:12:47 +09:00
yhirose
a72eef7fb4
Fixed #123
2019-01-29 12:05:32 -05:00
yhirose
8d908fadb6
Fixed #120
2019-01-15 08:08:34 -05:00
yhirose
b5927aec12
fix #116
2018-12-17 21:07:38 -05:00
yhirose
d0090b158f
fix #112
2018-12-13 19:37:44 -05:00
yhirose
86b3dfc480
fix #110
2018-11-30 21:18:35 -05:00
yhirose
5ad4311fb0
fix #109
2018-11-22 20:50:54 -05:00
Geraldo Intmain
c4f9062552
Encode space and plus characters
2018-10-29 20:46:11 -03:00
yhirose
49c82c9c50
Fix #97 . (Thanks to DJm00n.)
2018-10-28 16:15:22 +09:00
Duncan Ogilvie
d0c5c66bd6
Fix undefined behavior + make some ifdefs more readable
2018-10-14 12:39:51 +02:00
yhirose
d32eee7627
Fix #96
2018-09-30 08:40:31 -04:00
yhirose
abf79d5a38
Code cleanup
2018-09-23 12:32:26 -04:00
yhirose
4d7cee81eb
Fix #95
2018-09-23 12:02:17 -04:00
Duncan Ogilvie
bc16283a2f
Change size_t to time_t where applicable
2018-08-17 11:51:41 +02:00
Thomas Tissot
82fc7d5591
Request cancelation feature
...
This commit modifies the signature of the `Progress` callback
so that its return value will indicate whether the request shall
continue to be processed by returning `true`, or if it shall
be aborted by returning `false`. Such modification will allow
one to cancel an ongoing request before it has completed.
When migrating, developers should modify there `Progress`
callbacks to always return `true` by default in case there
do not want to benefit from the cancelation feature.
A few unit tests use cases were provided, but anyone should feel
free to provide additional uses cases that they find relevant.
2018-08-06 11:54:52 +02:00
yhirose
f2daaf1b85
Merge pull request #85 from davidgfnet/streaming
...
Implementing streaming Responses
2018-08-01 17:56:09 -04:00
David Guillen Fandos
dae4124039
Implementing streaming Responses
...
This enables a much easier handling of big queries after all.
2018-08-01 23:53:01 +02:00
yhirose
07910f73a9
Fixed problem that listen may return incorrect value when calling stop;
2018-07-31 19:46:04 -04:00
Maksim Kolinichenko
15ed1b4883
Add Keep-Alive header to response
2018-07-27 17:39:04 +03:00
Maksim Kolinichenko
d26ee03613
Fixed request parsing regex typo
2018-07-27 17:26:14 +03:00
Albert S
d9479bc0b1
Fixed bound checks for #74
2018-06-02 08:40:19 +02:00
yhirose
890025e347
Merge pull request #75 from crtxcr/http_response_codes
...
More status messages for http codes
2018-06-01 23:07:14 -04:00
yhirose
2bb27aa25d
Fix #74
2018-06-01 23:05:32 -04:00
Albert S
bb2f96afeb
Added a few more common http status codes
2018-06-01 14:34:58 +02:00
yhirose
5b3187e2f9
Fix #72
2018-05-31 22:17:23 -04:00
yhirose
5a78e1c457
Added 'set_keep_alive_max_count' method on Server
2018-05-31 19:01:24 -04:00
Scott Graham
f275352cba
Handle port==0 when socket is bound on ipv6
...
I discovered
0515c6aad6
doesn't work when the server is bound on an AF_INET6 address on Windows
due to the getsockname() call failing.
2018-05-29 12:59:13 -07:00
yhirose
7b9d752583
Fixed problem with connection close
2018-05-14 00:05:14 -04:00
yhirose
312a8d7523
Removed HTTP version. It's now always 'HTTP/1.1'.
2018-05-13 19:18:25 -04:00
yhirose
37130cd7f9
Changed to use INVALID_SOCKET
2018-05-10 23:56:24 -04:00
Joshua Peraza
75285e8713
Define and use kInvalidSocket
2018-05-09 16:28:39 -07:00
yhirose
6c5d0b2a18
Fix #57 and #62
2018-05-08 21:51:41 -04:00
Enzo AGUADO
911e620a54
don't include sys/select on windows
2018-05-07 16:59:08 +08:00
Enzo AGUADO
632df52b4f
add sys/select.h for musl libc
2018-05-07 02:15:12 +08:00
yhirose
3eff00bbc8
Fix #60
2018-04-29 18:20:38 -04:00
adikabintang
ef5c4144d7
add keyword inline to some function definitions to avoid linking error
2018-04-26 12:07:44 +07:00
yhirose
6aa3fd6b59
Fix #38
2018-04-20 09:59:19 -04:00
yhirose
755f05c02b
Removed global mutex
2018-04-20 09:37:59 -04:00
yhirose
5574d82eb3
Made a temporary fix for OpenSSL thread problem
2018-04-20 00:17:51 -04:00
Scott Graham
889041f05f
Don't fail chunked read if buffer not yet filled
2018-04-17 22:05:38 -07:00
yhirose
956faae6f0
Changed output type of read_content_??? functions to be std::string&
2018-04-17 23:47:24 -04:00
yhirose
b6df220b55
Fixed #48
2018-04-17 13:10:05 -04:00
yhirose
bc051219f9
Removed is_handling_requests
2018-04-17 13:10:05 -04:00
Scott Graham
ca3613cd21
Make 'chunked' in Transfer-Encoding case-insensitive
2018-04-16 21:43:41 -07:00
yhirose
9dc4e23082
Unit test for #52
2018-04-17 00:05:05 -04:00
yhirose
3c711089e5
Temporary solution for #52
2018-04-16 22:12:45 -04:00
yhirose
66550eb71b
Changed to return 415 instead of 406 for invalid Content-Encoding.
2018-04-16 21:02:24 -04:00
yhirose
ebe40a7d94
Merge pull request #50 from sgraham/body-decompress
...
Support Content-Encoding: gzip on server side
2018-04-16 20:54:25 -04:00
Scott Graham
5579d4d101
Support Content-Encoding: gzip on server side
...
If the client specifies Content-Encoding: gzip for POST requests,
decompress the body before attempting to parse it.
2018-04-16 15:16:17 -07:00
yhirose
4ddd5d9c5c
Merge pull request #51 from sgraham/chunk-terminator
...
Read \r\n terminator after chunked encoding
2018-04-16 17:43:12 -04:00
Scott Graham
87c673fd67
Read \r\n terminator after chunked encoding
2018-04-16 10:28:59 -07:00
Scott Graham
0515c6aad6
Support system-assigned port via two part listen()
...
This fixes #46 by allowing the user to separate the port bind from the
blocking listen(). Two new API functions bind_to_any_port() (which
returns the system-assigned port) and listen_after_bind() are equivalent
to the existing listen().
2018-04-16 08:23:41 -07:00
yhirose
0e239a0014
Fix #47
2018-04-14 18:42:56 -04:00
yhirose
5536d4c1ff
Fix #44
2018-04-06 17:02:37 -04:00
yhirose
b6790b39c1
Fixed build problem with OPENSSL_SUPPORT
2018-03-13 22:44:28 -04:00
Kevin B. Carpenter
73fa115803
Added capture and setting of REMOTE_ADDR in request.
2018-03-06 08:20:51 -07:00
yhirose
b7b3588afb
Connection timeout support on Client ( Fixed #34 )
2018-01-04 20:35:58 -05:00
yhirose
1d5fbe6a5b
Add gzip support. resolved #11
2017-12-30 00:00:43 -05:00
yhirose
1c86540fe5
Fixed content-type problems
2017-12-22 23:16:28 -05:00
yhirose
23c8f0c738
Fixed #28 . (Keep-Alive connection support)
2017-12-20 17:32:15 -05:00
yhirose
a83dcefe86
Fixed SSL server problem with bad key.pem and cert.pem
2017-12-17 22:23:05 -05:00
yhirose
95b22a980a
Fixed #35
2017-12-16 19:07:58 -05:00
yhirose
38bbe4ec4c
Removed automatic inclution of <openssl/ssl.h> with '__has_incude'
2017-12-16 18:40:35 -05:00
yhirose
7e5db48bdf
Fixed #33
2017-12-12 22:20:40 -05:00
yhirose
c76d0e4ab3
Allow leading and trailing whilespaces before/after header field values
2017-12-10 22:42:11 -05:00
yhirose
31e53d21e4
Fixed #32
2017-12-10 22:34:37 -05:00
yhirose
459f197ed0
Fixed #30
2017-12-10 15:11:03 -05:00
yhirose
cca90184aa
Raname refactoring
2017-12-09 16:45:40 -05:00
yhirose
e557282641
Rename argument name
2017-12-07 13:19:03 -05:00
yhirose
f35f2b23fa
Fixed problems with Visual Studio 2013
2017-12-07 13:10:20 -05:00
yhirose
0968d71c96
Fixed build problems on Msys2
2017-12-07 08:28:06 -05:00
yhirose
929c546f17
Fixed #29
2017-12-07 00:20:59 -05:00
yhirose
6a608b3ed4
Fixed Unit test failures on Windows
2017-12-07 00:05:43 -05:00
yhirose
315c11d6e2
Implemented socket_reader
2017-12-06 23:52:34 -05:00
yhirose
c3346a4815
Changed to use std::multimap for params
2017-12-05 23:19:39 -05:00
yhirose
bb8a1df7a3
Fixed #21
2017-12-05 19:19:07 -05:00
yhirose
ea9c8ee46b
Fixed build error
2017-12-05 19:15:52 -05:00
yhirose
4fb2f51766
Fixed #19
2017-12-03 22:31:00 -05:00