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

3203 Commits

Author SHA1 Message Date
bel
d224a2a9ab Unit test: cgi scripts for linux must be executable 2016-03-18 21:40:55 +01:00
bel
6fb124abdf Print data model with system information 2016-03-18 21:40:52 +01:00
bel
a41e091973 Win64 builds should use OpenSSL 64 bit as default 2016-03-18 21:40:49 +01:00
bel2125
d86203ba04 Merge pull request #279 from jd-boyd/appveyor_verbose_test_failure
Turn on verbose output on failure for tests.
2016-03-18 20:33:09 +01:00
Martin Gaida
ca755dd11d Added certificate hot swap for use with short lived certificates. 2016-03-18 17:06:55 +01:00
Joshua D. Boyd
dede1e562f Turn on verbose output on failure for tests. 2016-03-18 02:50:03 -04:00
bel
262d0f1347 Fix CGI unit test for NO_FILES define 2016-03-18 00:02:39 +01:00
bel
35a8e47daf Fix CGI unit test for NO_FILES define 2016-03-17 23:45:00 +01:00
bel
dc17b54547 Fix CGI unit test for NO_FILES define 2016-03-17 23:25:08 +01:00
bel2125
6094caa9d2 Merge pull request #277 from jd-boyd/fix_cgi_test
Fix signed conversion error in a new CGI test.
2016-03-17 22:18:26 +01:00
Joshua D. Boyd
a44b500669 Fix signed conversion error in a new CGI test.
The broken test was introduced in 54c6b08.

Closes #276.
2016-03-17 02:20:32 -04:00
bel
54c6b08917 Add unit test for CGI 2016-03-16 23:13:23 +01:00
bel2125
6506e38923 Merge pull request #275 from jd-boyd/mg_send_mime_file
Add mg_send_mime_file.
2016-03-16 20:03:22 +01:00
Joshua D. Boyd
4c52dcfd6a Add mg_send_mime_file.
This allows sending files with a specified Content-Type instead of
relying on file name extension lookup.
2016-03-16 00:33:26 -04:00
bel
aa4408b202 Fix crash if mg_start is called twice, with invalid port at first call (see #270) 2016-03-15 21:22:10 +01:00
bel2125
ea1314b7a6 Merge pull request #272 from jd-boyd/jdb_font_mimes
Add MIME types for fonts.
2016-03-15 20:43:14 +01:00
Joshua D. Boyd
3ff8a74afe Add MIME types for fonts. 2016-03-14 23:42:22 -04:00
bel
da7f6c3943 Do not call CRYPTO_cleanup_all_ex_data for every thread ... again.
This commit undoes commit f8709d6caf (Issue #263)

According to the OpenSSL-Documentation https://wiki.openssl.org/index.php/Library_Initialization#Cleanup:

"CRYPTO_cleanup_all_ex_data and ERR_remove_state should be called on each thread, and not just the main thread."

The CRYPTO_cleanup_all_ex_data for every thread have been added with the commit f8709d6caf.
However, since then there are some sporadic crashes in the automatic tests.

Checking the discussion page of this documentation (https://wiki.openssl.org/index.php/Talk:Library_Initialization):

You said: "CRYPTO_cleanup_all_ex_data and ERR_remove_state should be called on each thread, and not just the main thread."

However the FAQ says:

> "Brutal" (thread-unsafe) Application-global cleanup functions:
>
>  ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().'
>
> And the code comments for CRYPTO_cleanup_all_ex_data() say:
>
>/* Release all "ex_data" state to prevent memory leaks. This can't be made
> * thread-safe without overhauling a lot of stuff, and shouldn't really be
> * called under potential race-conditions anyway (it's for program shutdown
> * after all). */
>
>So I don't think its right to say CRYPTO_cleanup_all_ex_data() should be called on each thread. >--Matt (talk) 14:30, 7 May 2015 (UTC)

... So, this commit removes the extra CRYPTO_cleanup_all_ex_data again.

Let's see if the crashes in the CI tests are gone ...
2016-03-14 22:13:31 +01:00
bel
833fda13ba mg_remove is also available if NO_FILE is set 2016-03-14 22:05:32 +01:00
bel
8b5b7d516d Add some comments on cache control 2016-03-14 21:35:32 +01:00
bel2125
e7758c8ef5 Fix some coverity warnings 2016-03-14 21:11:40 +01:00
bel
f8709d6caf Call CRYPTO_cleanup_all_ex_data for every thread (#263) 2016-03-13 22:06:54 +01:00
bel
23f02df8fd Configuration for Cache-Control: max-age
Experimental configuration option "_experimental_static_file_max_age" for tests.
TODO: rename this option and documetent it in UserManual.md

This also addresses the "Caching" issue of #201
2016-03-13 21:29:55 +01:00
bel
bfc6dfe52b Remove nested comment 2016-03-13 20:09:40 +01:00
bel
5d2e7c889d Mark test/unit_test.c as obsolete.
Since the new CMake based build system will use other files for
unit tests (public_func.c, public_server.c, private.c, private_exe.c
and others), this file is no longer maintained, and will be removed
in the future.

See also #269
2016-03-08 19:48:30 +01:00
bel
2ed461a147 HTTP response codes according to IANA registration page:
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
2016-03-08 19:42:16 +01:00
bel2125
6199ef4f77 Merge pull request #269 from mingodad/master
Fix unit_test.c

(Note from the maintainers: unit_test.c is mostly obsolete and replaced by the CMake based unit test system.)
2016-03-08 19:41:30 +01:00
mingodad
af2cb138be Fix unit_test, still not working properly 2016-03-06 12:08:58 +00:00
bel
27a56bbe3e Add a note not to create a CivetServer instance with a static constructor in a Windows DLL
See #264
2016-02-29 21:18:53 +01:00
bel
0c5c6aa74f Auto-format after merge 2016-02-29 21:14:04 +01:00
bel2125
9181014ce4 Merge pull request #267 from jackcha83/master
In read_request() function, last_action_time is always zero before en…
2016-02-29 20:54:57 +01:00
Jack
0529225b5e In read_request() function, last_action_time is always zero before entering the while loop 2016-02-29 10:11:26 -08:00
bel
55eea8eb8d Change option tcp_nodelay from boolean to number
This allows to implement a finer control over when to disable Nagle's algorithm.
See comment on #258
2016-02-28 23:04:45 +01:00
bel
631eaeaac5 Update link for coveralls batch (see #183) 2016-02-28 23:02:07 +01:00
bel
7ac5644ec0 Update release notes 2016-02-28 22:17:28 +01:00
bel
e6f4e235e3 Update credits
Add all authors since the last update.
From the git history by:
git log --format="%aN" 13f6c043aaeee60fcb5ac063c895fc80867f7ccc..HEAD | sort -u
2016-02-28 22:16:53 +01:00
bel
9af9b18316 Run CivetWeb without config file (See #201) 2016-02-28 00:28:58 +01:00
bel
ccd67fabef Uninitialize openSSL to avoid memory leak (see #263) 2016-02-27 22:29:03 +01:00
bel
60f207111d Don't call local request handler for requests with absolute URIs of other servers (#266) 2016-02-26 23:32:35 +01:00
bel
bd30fe2fd5 Check domain name when checking absolute URIs 2016-02-26 23:24:40 +01:00
bel
d2c64184d9 Replace fopen by mg_fopen
mg_fopen uses unicode (UTF-8) file names in windows, while fopen uses code page depending string encoding
2016-02-21 23:01:34 +01:00
bel
451735c7e3 Replace fopen by mg_fopen in civetweb.c
mg_fopen uses unicode (UTF-8) file names in windows, while fopen uses code page depending string encoding

TODO: the same for all *.inl files
2016-02-21 22:40:53 +01:00
bel
92099ed0da Add funtion to store body data 2016-02-21 21:36:37 +01:00
bel
9d7e746d03 Test mg_close_connection 2016-02-21 19:57:17 +01:00
bel
aa6dd2f84e Add example for a Lua file handler 2016-02-20 20:47:33 +01:00
bel2125
75fcc82daa Merge pull request #261 from javaJake/websocketclose
Only free conn if in client context.
2016-02-19 23:59:10 +01:00
bel
a44640fc36 Document tcp_nodelay option (see #258) 2016-02-19 23:28:22 +01:00
bel2125
550352cba1 Merge pull request #258 from waltsteverson/master
Add config option for enabling the TCP_NODELAY option on client sockets
2016-02-19 23:23:17 +01:00
bel
58ca276782 Fix use of std::vector in optional C++ interface (see #262) 2016-02-19 23:12:30 +01:00
Jacob Skillin
c793d57105 Free mutex prior to freeing conn
The worker_thread_run will handle freeing the mutex in a server context
2016-02-19 13:25:27 -05:00