1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-12-22 04:02:04 +03:00
Commit Graph

1536 Commits

Author SHA1 Message Date
bel
5675cfe6c2 Add comments for the C++ wrapper 2014-06-20 23:32:17 +02:00
bel
864aaf037c Fix issue #24: move initialization of thread synchronization objects befor the first call of free_context 2014-06-18 22:39:01 +02:00
bel
db1e1eb028 C++ Wrapper: Store post data per connection instead of per server
Fix #2 as proposed on June 16 2014 - see:
See https://groups.google.com/forum/#!topic/civetweb/ri0mNRJ_5-4
2014-06-16 22:36:42 +02:00
bel
be97d78aac Enhance C++ embedding example for CivetServer::getParam test 2014-06-14 08:02:43 +02:00
bel
24dfa15f88 Null-terminate string in CivetServer::getParam 2014-06-14 07:45:52 +02:00
bel
47a95f4028 Update release notes 2014-06-14 06:57:22 +02:00
bel
9446bf0f4a Null-terminate string in CivetServer::getParam
issue reported by Menno Lodder, see see Mailing-List
https://groups.google.com/forum/#!topic/civetweb/ri0mNRJ_5-4
see also issue #11
2014-06-14 06:53:36 +02:00
bel
88770422b9 Documentation for Websocket for Lua 2014-06-11 23:40:59 +02:00
bel
73135887de Rewrite websocket for Lua (Step 18 of ?) 2014-06-11 22:51:34 +02:00
bel
1bb0b78e04 Extend test: Read content of POST request 2014-06-10 23:40:07 +02:00
bel
6a16ec28e5 Rewrite websocket for Lua (Step 17 of ?) 2014-06-10 23:22:52 +02:00
bel
838ae24645 Add test for PUT/DELETE in Lua resource scripts 2014-06-10 22:37:18 +02:00
bel
661a1bac39 Rewrite websocket for Lua (Step 16 of ?) 2014-06-09 22:44:45 +02:00
bel
e7f26f92e0 Rewrite websocket for Lua (Step 15 of ?) 2014-06-09 01:34:23 +02:00
bel
edadd7ebf2 Rewrite websocket for Lua (Step 14 of ?) 2014-06-01 14:50:32 +02:00
bel
2a2efc26f7 Rewrite websocket for Lua (Step 13 of ?) 2014-06-01 00:16:47 +02:00
bel
9ec115fff2 Rewrite websocket for Lua (Step 12 of ?) 2014-05-31 00:06:11 +02:00
bel
01969ad519 Rewrite websocket for Lua (Step 11 of ?) 2014-05-29 23:46:25 +02:00
bel
021341c362 Rewrite websocket for Lua (Step 10 of ?) 2014-05-24 00:56:28 +02:00
bel
ab3bc563cd Rewrite websocket for Lua (Step 9 of ?) 2014-05-24 00:14:37 +02:00
bel
6e8415d4e5 Rewrite websocket for Lua (Step 8 of ?) 2014-05-22 23:51:32 +02:00
bel
e2f8196be3 Rewrite websocket for Lua (Step 7 of ?) 2014-05-22 23:17:07 +02:00
bel
dbcae1b0e8 Rewrite websockets for Lua (Step 6 of ?) 2014-05-21 22:52:07 +02:00
bel
5d7c1d165b Rewrite websockets for Lua (Step 5 of ?) 2014-05-21 22:32:08 +02:00
bel
ed963c9793 Rewrite websocket for Lua (step 4 of ?) 2014-05-19 21:09:50 +02:00
bel
c9adad6e81 Rewrite websockets for Lua (Step 3 of ?) 2014-05-18 00:09:14 +02:00
bel2125
efa959642c Merge pull request #22 from dalgaaf/wip-da-sca-20140513
Fixes from clang scan-build
2014-05-13 19:03:30 +02:00
Danny Al-Gaaf
bedc028f38 civetweb.c: fix potential memory leak in set_ports_options
Free 'ptr' in case realloc was successful, but the next check fails.

Fix for clang scan-build report:

5886 if (!success) {

    35 Potential leak of memory pointed to by 'ptr'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 18:18:11 +02:00
Danny Al-Gaaf
1b5bac47c4 civetweb.c: remove some dead assignments related to 'sock'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 17:32:39 +02:00
Danny Al-Gaaf
7d7ec45f25 civetweb.c: remove dead assignemnt of 'keep_alive'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:54:14 +02:00
Danny Al-Gaaf
94e68b7348 civetweb.c: remove dead assignment of 'res' in match_prefix()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:51:37 +02:00
Danny Al-Gaaf
2d8fec839c main.c: fix another potential buffer overflow in strncat() call
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:45:22 +02:00
Danny Al-Gaaf
91f7daa9ed main.c: fix strncat call to prevent buffer overflow
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:43:28 +02:00
bel
429e051af8 Rewrite Lua Websockets (Step 2 of ?) 2014-05-12 22:01:26 +02:00
bel
5522ad9555 Rewrite websockets for Lua (Step 1 of ?) 2014-05-11 21:55:08 +02:00
bel
75aa590c04 Update release notes and credits 2014-04-29 20:21:57 +02:00
bel2125
76813c8d0b Merge pull request #21 from dalgaaf/wip-da-sca
Various fixes from SCA and Coverity
2014-04-28 23:29:14 +02:00
bel
3eecdd9370 Allow includes in htpasswd files 2014-04-28 23:12:35 +02:00
Danny Al-Gaaf
2e97ddc4db main.c: move 'guard' variable to _WIN32
Only needed in _WIN32 case. Otherwise unused.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 16:41:02 +02:00
Danny Al-Gaaf
6427a56977 civetweb.c: check for array boundry before read
Added assert to while loop to make sure not to read over the array boundry.

Fix for Coverity issue from Ceph project:

CID 1160832 (#1 of 1): Out-of-bounds read (OVERRUN_STATIC)
 37. overrun-local: Overrunning static array "buf", with 8192
 elements, at position 8192 with index variable "len".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 16:37:35 +02:00
bel
3b0ec24fa2 Show syntax errors in .htpasswd files 2014-04-24 22:55:17 +02:00
bel
4b0bfbb55b Error4xx page should be an error404 page. The error 403 (e.g., list a directory if enable_directory_listing no is configured) will show the error.lua page 2014-04-24 22:23:29 +02:00
Danny Al-Gaaf
8e2de6920c civetweb.c: use NULL for pointers
fix for cgcc warnings:

src/civetweb.c:5455:56: warning: Using plain integer as NULL pointer
src/civetweb.c:5696:28: warning: Using plain integer as NULL pointer
src/civetweb.c:5698:26: warning: Using plain integer as NULL pointer
src/civetweb.c:6456:34: warning: Using plain integer as NULL pointer
src/civetweb.c:6643:34: warning: Using plain integer as NULL pointer
src/civetweb.c:6811:29: warning: Using plain integer as NULL pointer

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:23:27 +02:00
Danny Al-Gaaf
ca9660e2fd main.c: use NULL for pointer
fix for cgcc warning:

src/main.c:238:48: warning: Using plain integer as NULL pointer
src/main.c:246:44: warning: Using plain integer as NULL pointer
src/main.c:418:17: warning: Using plain integer as NULL pointer

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:19:51 +02:00
Danny Al-Gaaf
afc9ec878e civetweb.c: change some local functions to static
Fix for cgcc warning:

src/civetweb.c:6189:22: warning: symbol 'mg_connect' was not declared.
  Should it be static?

src/civetweb.c:6743:6: warning: symbol 'get_system_name' was not declared.
 Should it be static?

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:15:42 +02:00
Danny Al-Gaaf
741fa81371 civetweb.c: check array limits before access array
[src/civetweb.c:3250]: (style) Array index 'i' is used before limits check.
[src/civetweb.c:3254]: (style) Array index 'i' is used before limits check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:52:01 +02:00
Danny Al-Gaaf
fdc0ed2689 civetweb.c: fix sscanf format string to %u
[src/civetweb.c:5728]: (warning) %d in format string (no. 2) requires
 'int *' but the argument type is 'unsigned int *'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:44:16 +02:00
Danny Al-Gaaf
23857b161d civetweb.c: fix format string from %d to %u
[src/civetweb.c:366]: (warning) %d in format string (no. 4) requires
 'int' but the argument type is 'unsigned int'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:42:10 +02:00
Danny Al-Gaaf
c4647ea6d3 civetweb.c: fix sprintf format specifier
Change %u to %lu and cast size_t to unsigned long to fix:

[src/civetweb.c:360]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:360]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:360]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:388]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:388]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:388]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:414]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:414]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:414]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:421]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:421]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:421]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:12 +02:00
Danny Al-Gaaf
9665010252 mod_lua.inl: Clarify expression with parentheses
Fix for:
[src/mod_lua.inl:899]: (style) Suspicious condition (assignment +
 comparison); Clarify expression with parenth

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:09 +02:00