1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-08-20 20:41:19 +03:00
Commit Graph

90 Commits

Author SHA1 Message Date
bel
a1c09b8186 Only use one command in a line in the unit test 2015-05-20 20:07:18 +02:00
bel
d264808e52 Clean usage of const/not const mg_context* and mg_connection* handles in the API.
The API had an inconsistant usage of `const mg_connection *` and `mg_connection *`,
that may cause warnings (e.g., #109). Now all non-const `mg_connection *` is only
required to read/write the connection.
2015-04-29 00:13:25 +02:00
bel
62a46e647f Test for memory leaks in unit test
Add a test for issue #92 to the unit test
2015-04-21 22:00:46 +02:00
bel
436bc39555 Handler for websocket connection (Step 2/?)
Add an interface to register handler for websocket connections.
See enhancement #30 and question #101
2015-04-19 00:43:11 +02:00
Kevin Wojniak
2b76d9f7c8 Avoid crash if tests aren't ran from 'test' directory 2015-04-14 14:20:39 -07:00
Kevin Wojniak
2a647d166c Fix passing strings with different sign 2015-04-14 14:09:56 -07:00
Kevin Wojniak
9f24dd5852 Fix wrong format specifier 2015-04-14 14:06:52 -07:00
Kevin Wojniak
3c3ddb47f4 Fix comparison of integers of different signs 2015-04-14 14:06:34 -07:00
Kevin Wojniak
95a2cf40d0 Fix clang missing field initializer warning.
Static variables are initialized to zero so no need to explicitely do it.
2015-04-14 14:03:35 -07:00
Kevin Wojniak
d7d9469db8 Fix unused variables in default unit test build 2015-04-14 14:01:54 -07:00
bel
e5dc8cba75 Improve unit test 2015-04-12 00:00:25 +02:00
bel
b2bdb79200 Unit test for set_request_handler (incomplete) 2015-04-12 00:00:22 +02:00
bel
457e6cc8c9 Add test for client functions and fix their timeout handling 2015-03-28 00:03:27 +01:00
bel
83475636b5 Fix unit test
Last pull request had syntax errors
2015-03-27 17:45:35 +01:00
Danny Al-Gaaf
3d00b0940d unit_test.c: comment out unused variables
These variables are unused but there is already out commented
code useing them. Keep them until it's decided what happens
with this code.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-23 16:40:15 +01:00
Danny Al-Gaaf
5bf5f19452 unit_test.c: close va_list before return
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-23 16:39:54 +01:00
bel
154b80bb69 Make client address available in mg_request_info also for IPv6 (see also issue #33) 2014-09-14 11:04:42 +02:00
bel
5e52950838 Add close callback for websocket clients 2014-08-31 01:34:04 +02:00
bel
eac72465ad Allow multiple websocket clients with different callbacks and an additional user supplied argument 2014-08-30 23:31:21 +02:00
bel
593596307b Unit test must start local server 2014-08-27 22:25:09 +02:00
bel
b53fd004c6 Get civetweb to compile for strict C again 2014-08-27 22:04:14 +02:00
bel2125
1a901e5526 Merge pull request #38 from jshelley/master
Implemented initial websocket client support - a few changes to interface and implementation will follow soon.
2014-08-27 21:42:13 +02:00
Jordan
5d465aadad Fixed the copyright, changed mg_client_websocket_connect to mg_websocket_client_connect 2014-08-26 15:22:22 -04:00
Jordan
a4eca7c492 Added a unit test for websocket_client functionality, other small fixes 2014-08-21 14:53:47 -04:00
bel
61c52a6fb9 Fix another TODO in the unit test 2014-08-21 00:37:04 +02:00
bel
53d4247314 clean up unit_test: SSL related TODOs are done 2014-08-19 21:58:23 +02:00
bel
2603a43dbf Fix unit test for SSL redirect 2014-08-19 21:42:40 +02:00
bel
49ecd448ce Improve unit test for mg_download 2014-08-18 23:46:28 +02:00
bel
a0b8f8de31 Fix unit test for HTTPS 2014-08-17 01:52:21 +02:00
bel
65bcfea12c Adapt unit test for mg_download, so the tested http operations are standard compliant 2014-08-17 01:06:10 +02:00
Jan Willem Janssen
d1437f9f5d Make content length available in request_info:
- given that the content-length header is already parsed, lets make
  it also available in the request_info struct to allow easy access;
- added simple unit test to verify the behavior of the new field.
2014-08-13 15:07:01 +02:00
Danny Al-Gaaf
d36e535c65 unit_test.c: fix printf, remove unused parameter
Fix for:
[test/unit_test.c:827]: (warning) printf format string requires 0
 parameters but 1 is given.
[test/unit_test.c:833]: (warning) printf format string requires 0
 parameters but 1 is given.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:05 +02:00
bel
8fbf4e94ce Add md5 test to unit test 2014-04-19 22:02:03 +02:00
bel
ca5967bbdf SSL unit tests 2014-03-22 00:51:17 +01:00
bel
34f434b07b Get unit-tests running again (90% done, some tests commented out for the moment) 2014-03-20 23:02:56 +01:00
bel
5ca68ecbfa Unit test for Windows 2014-03-20 21:12:44 +01:00
jmc-
89c1672469 Added a new Makefile rule called 'unit_test', which builds a stand-alone executable called 'civetweb_test' that runs unit tests.
Also fixed up the aging test/unit_test.c file so that it compiles and runs.

Build unit tests with 'make unit_test' or 'make unit_test WITH_LUA=1'.
2014-03-19 16:07:37 -07:00
Thomas Davis
b2aee90d14 Regorganized directories to make them more intuitive 2013-10-07 14:22:16 -04:00
Thomas Davis
a8bc92a305 Renamed to Civetweb 2013-10-07 14:22:09 -04:00
Sergey Lyubka
2055d41a9f Corrected misplaced brackets in parse_http_message() 2013-08-14 10:55:36 +01:00
Sergey Lyubka
743f48b8e0 Added mg_exec_lua_script, mg_prepare_lua_environment -> prepare_lua_environment 2013-08-08 13:11:05 +01:00
Sergey Lyubka
e53d05637a Binding to IPv6 addresses 2013-07-28 12:15:16 +01:00
Sergey Lyubka
62d66201c9 make match_prefix() case-insensitive 2013-07-25 07:07:25 +01:00
Sergey Lyubka
c80a88a407 Added test for uploading 2 files 2013-07-23 08:17:00 +01:00
Sergey Lyubka
bc40aa5442 fixed strtoll() for win32: using _atoi64 2013-07-14 12:49:24 +01:00
Sergey Lyubka
e7c34c26cb mg_read() with no Content-Length would read until socket is closed 2013-07-01 08:45:07 +01:00
Sergey Lyubka
6e59ad8a0d Fix for prepare_lua_environment 2013-05-19 01:25:10 +01:00
Sergey Lyubka
2e232b3304 Lua functionality change: print renamed to mg.write, read renamed to mg.read. Expanded user manual, fixed example pages. 2013-05-15 17:42:34 +01:00
Sergey Lyubka
e579355b01 url_decode -> mg_url_decode 2013-05-08 11:40:13 +01:00
Sergey Lyubka
4120b9bcc0 mg_get_cookie() signature change 2013-04-11 12:49:41 -07:00