Evgeny Grin (Karlson2k)
466a56e3af
test_get_chunked: set footer when last chunk is being sending
2021-08-15 15:52:03 +03:00
Evgeny Grin (Karlson2k)
2143696e9f
test_callback: cosmetics
2021-08-15 15:51:12 +03:00
Evgeny Grin (Karlson2k)
a03cd38794
test_callback: improved test
...
Added detection of curl reported errors,
Added check that data was sent.
2021-08-15 15:51:01 +03:00
Alexander Irion
f5d387df7e
Fix busy waiting up to one second using connection timeout
...
MHD_daemon_get_timeout computes the time to wait as:
timeout = (last_activity + connection_timeout - MHD_monotonic_sec_counter ()) * 1000
After sleeping timeout milliseconds, MHD_monotonic_sec_counter () will be:
MHD_monotonic_sec_counter () = last_activity + connection_timeout
With that (timeout < (MHD_monotonic_sec_counter () - connection->last_activity)) evaluates to false and the MHD_connection_close_ is not done.
For the next cycle, MHD_daemon_get_timeout() will return 0 and this goes on, until MHD_monotonic_sec_counter jumps to the next second.
This bug causes thousands of unnecessary calls to MHD_run, when a connection timed out.
2021-08-11 22:38:41 +02:00
Evgeny Grin (Karlson2k)
e9fbb33158
connection.c: cosmetics
2021-08-11 22:33:20 +03:00
Evgeny Grin (Karlson2k)
96a0da03fe
response.c: used stricter check for "Upgrade:" header
2021-08-11 22:26:31 +03:00
Evgeny Grin (Karlson2k)
af3fc639b3
response headers: do not allow "Close" with upgrade responses
2021-08-11 22:26:31 +03:00
Evgeny Grin (Karlson2k)
88da9c6f15
internal.h: minor doxy correction
2021-08-11 22:26:31 +03:00
Evgeny Grin (Karlson2k)
dd9c707576
MHD_queue_response(): detect incorrect "upgrade" responses
2021-08-11 22:26:31 +03:00
Christian Grothoff
d929a44741
-typo
2021-08-04 19:07:27 +02:00
Christian Grothoff
f1f8851cd2
introduce new MHD_CONNECTION_INFO_HTTP_STATUS
2021-08-04 18:58:55 +02:00
Evgeny Grin (Karlson2k)
88b880e928
Minor doxy correction for 9949f0f3ac
2021-08-02 16:15:21 +03:00
Evgeny Grin (Karlson2k)
9949f0f3ac
Used faster internal function for Date: timestamp
2021-08-01 20:56:51 +03:00
Evgeny Grin (Karlson2k)
8933bf8fe1
Added internal MHD_uint8_to_str_pad() function
...
Function prints decimal numbers padded with zero
2021-08-01 18:27:01 +03:00
Evgeny Grin (Karlson2k)
571bdda907
response headers: disallow space in header name, allow tab in header value
2021-08-01 15:33:31 +03:00
Evgeny Grin (Karlson2k)
39eb60df61
response header: more pre-processing, better docs
...
* Disallow "Transfer-encoding: identity", not allowed by RFC
* Allow only single "Date" header
2021-08-01 15:31:30 +03:00
Evgeny Grin (Karlson2k)
db2ab3a5ae
response: do not allow "Connection: keep-alive" header
2021-08-01 13:24:32 +03:00
Evgeny Grin (Karlson2k)
497a3546bc
Added MHD_uint64_to_str() internal function
2021-07-30 18:41:46 +03:00
Evgeny Grin (Karlson2k)
aadbe63575
connection cleanup: streamlined cleanup process
2021-07-30 11:54:25 +03:00
Evgeny Grin (Karlson2k)
8df85c22f8
Updated some copyrights
2021-07-30 10:58:07 +03:00
Evgeny Grin (Karlson2k)
3e1c67a792
test_get_chunked: added tests with know size
2021-07-30 10:47:12 +03:00
Evgeny Grin (Karlson2k)
1130d9c0d0
MemoryPool: fixed assert
2021-07-29 21:40:33 +03:00
Evgeny Grin (Karlson2k)
f7db31373e
Moved reset of connection to dedicated function
2021-07-29 21:35:00 +03:00
Evgeny Grin (Karlson2k)
c106ce2a4f
MHD_connection_close_ (): changed clean-up order
...
* Mark connection as "ready for closure" only after clean-up
* Destroy response only after notifying of the client
2021-07-29 21:04:51 +03:00
Evgeny Grin (Karlson2k)
0d6210fbfd
build_connection_chunked_response_footer: asserts added
2021-07-28 15:08:34 +03:00
Evgeny Grin (Karlson2k)
922bf0e5c4
Added more tests for chunked reply encoding
2021-07-28 14:59:09 +03:00
Evgeny Grin (Karlson2k)
0eb4d030ae
test_http_reasons: fixed
...
The test was broken with update for new API
2021-07-28 13:47:09 +03:00
Evgeny Grin (Karlson2k)
f493fd84dc
Makefile fixed for dist* targets
2021-07-28 13:04:27 +03:00
Evgeny Grin (Karlson2k)
182ed3a0e0
response: use macro instead of string for connection header
2021-07-28 11:28:44 +03:00
Evgeny Grin (Karlson2k)
140f4844bb
Added new public API function MHD_get_reason_phrase_len_for()
2021-07-28 11:28:44 +03:00
Evgeny Grin (Karlson2k)
bbf0a2969c
Re-written chunk footer generation function as a separate function
...
Separated reply footer generation from reply header generation.
2021-07-28 11:28:44 +03:00
Evgeny Grin (Karlson2k)
28223f6a59
keepalive_possible(): check whether app requested close
2021-07-28 11:28:43 +03:00
Evgeny Grin (Karlson2k)
678dcd0931
response: use auto flag for chunked encoding header
2021-07-28 11:28:43 +03:00
Evgeny Grin (Karlson2k)
2cab7e09b7
try_ready_chunked_body: use new string function, fixes.
...
* Used new MHD_uint32_to_strx() function
* Ensure that send buffer always has at least 128 bytes to avoid
potential overrun
* Added static const vars for readability
2021-07-28 11:28:43 +03:00
Evgeny Grin (Karlson2k)
ee3f322200
Added internal functions for printing decimal and hex numbers
2021-07-27 11:00:42 +03:00
Evgeny Grin (Karlson2k)
237aebfade
mhd_str: use smaller include
2021-07-21 23:15:49 +03:00
Evgeny Grin (Karlson2k)
23a02962de
test_str_tokens_remove: shut spell checker
2021-07-21 23:11:24 +03:00
Evgeny Grin (Karlson2k)
de74ea36ff
test_str_tokens_remove: test corner cases
2021-07-21 23:04:40 +03:00
Evgeny Grin (Karlson2k)
eb731135bb
mhd_str.h: fixed compilation with MSVC
2021-07-21 23:01:07 +03:00
Evgeny Grin (Karlson2k)
c2a8933a7e
mhd_align.h: added support for MSVC compiler
2021-07-21 23:01:06 +03:00
Evgeny Grin (Karlson2k)
7de47306ca
mhd_align.h: fixed copy-paste error
2021-07-21 23:01:06 +03:00
Evgeny Grin (Karlson2k)
561c52c70a
MSVC projects: added missing header
2021-07-21 23:01:06 +03:00
Evgeny Grin (Karlson2k)
f45803ab5b
MSVC project: defaults to Vista+
2021-07-21 23:01:05 +03:00
Evgeny Grin (Karlson2k)
2c42613ce8
Restructured files in MSVC project
2021-07-21 23:00:55 +03:00
Christian Grothoff
ecf9dbb690
-fix typo
2021-07-18 13:52:12 +02:00
Christian Grothoff
41a3f2398a
-make spell checker happy
2021-07-14 14:37:16 +02:00
Christian Grothoff
39dddad671
-fix FTBFS: ssize_t needs stdlib.h on my system
2021-07-13 23:50:04 +02:00
Evgeny Grin (Karlson2k)
e1693575ed
response: process "Connection" header in a special manner
2021-07-05 17:01:21 +03:00
Evgeny Grin (Karlson2k)
ed3daed305
Added MHD_str_remove_tokens_caseless_() function
2021-07-05 17:01:21 +03:00
Evgeny Grin (Karlson2k)
ada4c2ed55
Added MHD_str_remove_token_caseless_() function
...
Function removes specified token from the input string and
normalizes list of tokens.
2021-07-05 17:01:21 +03:00