Commit Graph
1647 Commits
Author SHA1 Message Date
Christian Grothoff acea95a025 -record response length in log 2015-07-13 14:07:08 +00:00
Evgeny Grin (Karlson2k) 1b51979b0b Additional correction of usage of _WIN32/CYGWIN/MHD_WINSOCK_SOCKETS macros 2015-07-07 18:32:59 +00:00
Evgeny Grin (Karlson2k) f8b49a0730 platform.h: correction of sleep() and usleep() replacements for W32 2015-07-07 18:32:53 +00:00
Evgeny Grin (Karlson2k) c69306c17d Fix C++-style comments 2015-07-07 18:32:45 +00:00
Evgeny Grin (Karlson2k) 2c842e6b95 Move all internal limits definitions to MHD_limits.h 2015-07-07 18:32:33 +00:00
Evgeny Grin (Karlson2k) 4a251757ab daemon.c: cosmetics 2015-07-07 18:32:21 +00:00
Christian Grothoff a85f2baa9d fix #3869: outdated FSF address 2015-06-30 11:39:18 +00:00
Christian Grothoff 4d997941e3 fix late counter-decrement issue reported by MD on the mailinglist 2015-06-27 20:19:25 +00:00
Christian Grothoff 7eba79ea86 fix HEAD handling issue in connection with MHD_create_response_from_callback reported by Cristian Klein on the mailinglist 2015-06-26 21:20:27 +00:00
Christian Grothoff 62f06f739a -support HEAD in example 2015-06-26 21:18:13 +00:00
Christian Grothoff 2d02ec7e60 add content-disposition 2015-06-26 09:28:32 +00:00
Christian Grothoff 55ecaec5a7 modify demo to handle HEAD requests 2015-06-25 19:08:49 +00:00
Christian Grothoff 4cdf058b25 -clarify when it is safe to call MHD_suspend_connection 2015-06-25 12:59:09 +00:00
Christian Grothoff 4f9c53c222 -fix compiler warnings 2015-06-12 07:45:50 +00:00
Evgeny Grin (Karlson2k) c461ee5489 Bump MHD_VERSION, update ChangeLog, substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset() 2015-06-09 19:34:53 +00:00
Evgeny Grin (Karlson2k) 2ece82f12e send_param_adapter(): support hosts with sendfile64(), but with 32-bit off_t (i.e. Android) 2015-06-09 19:34:45 +00:00
Evgeny Grin (Karlson2k) a78b44a832 Add MHD_FEATURE_LARGE_FILE value for MHD_is_feature_supported() 2015-06-09 19:34:36 +00:00
Evgeny Grin (Karlson2k) 588d2c38a2 response.c: MHD_create_response_from_fd_at_offset64(): don't create response if requested offset or size is not supported 2015-06-09 19:34:27 +00:00
Evgeny Grin (Karlson2k) cbdf2fe105 response.c: file_reader(): reduce read size if buffer is too large 2015-06-09 19:34:21 +00:00
Evgeny Grin (Karlson2k) 329c470596 response.c: file_reader(): add support for Linux hosts with 64-bit seek, but with 32-bit off_t (Android) 2015-06-09 19:34:14 +00:00
Evgeny Grin (Karlson2k) 67859a6401 response.c: file_reader(): add support for W32 64-bit seek 2015-06-09 19:34:07 +00:00
Evgeny Grin (Karlson2k) 09088de0db Add MHD_create_response_from_fd64() and MHD_create_response_from_fd_at_offset64() functions,
check lseek() results when reading file, check whether desired file offset fits off_t
2015-06-09 19:33:57 +00:00
Evgeny Grin (Karlson2k) b218fd29ff fix: send_param_adapter(): do not send chunks larger than requested when using sendfile() 2015-06-08 22:18:30 +00:00
Evgeny Grin (Karlson2k) d4168c4478 fix used constant in send_param_adapter(), actually cosmetics only 2015-06-08 22:06:01 +00:00
Evgeny Grin (Karlson2k) b73339586b send_param_adapter(): fix setting errno on W32 2015-06-08 21:57:59 +00:00
Evgeny Grin (Karlson2k) bbb0c2504f recv_param_adapter() and send_param_adapter(): reduce receive/send size if it's too large 2015-06-08 21:57:52 +00:00
Christian Grothoff e5e5034111 I was checking a test app in valgrind and much to my surprise it was complaining about a memleak in libmicrohttpd.
In check_argument_match() a buffer is allocated using strdup() but freed nowhere.

I wouldn't have noticed this leak if it wasn't for valgrind because if a URI is requested without any arguments (my usual case)
the buffer that gets allocated has 'only' a length of 1 byte, thus memory usage will build up very slowly over time.

The patch attached fixes it.
Btw. the indentation of that file is a mess, tabs and spaces are mixed :-|

Regards,
Andreas
2015-06-04 11:37:05 +00:00
Evgeny Grin (Karlson2k) 31d84d44a3 Bump MHD_VERSION and update ChangeLog 2015-06-03 21:28:22 +00:00
Evgeny Grin (Karlson2k) 1061f6809d microhttpd.h: print deprecation messages if MHD_create_response_from_data() is used 2015-06-03 21:28:14 +00:00
Evgeny Grin (Karlson2k) e52e1575df microhttpd.h: add defines for deprecating functions 2015-06-03 21:28:05 +00:00
Evgeny Grin (Karlson2k) d474f26d15 microhttpd.h: print deprecation messages if MHD_LONG_LONG or MHD_LONG_LONG_PRINTF are defined or
if MHD_HTTP_METHOD_NOT_ACCEPTABLE is used
2015-06-03 21:27:58 +00:00
Evgeny Grin (Karlson2k) 86c904a4be microhttpd.h: add defines for deprecating macros 2015-06-03 21:27:51 +00:00
Evgeny Grin (Karlson2k) 4d75ef3321 Unify and correct usage of WINDOWS/CYGWIN/MHD_WINSOCK_SOCKETS macros 2015-06-02 10:08:05 +00:00
Christian Grothoff 689d2dc98d -comment on data types 2015-06-02 08:07:49 +00:00
Christian Grothoff b7ab035907 -fix warning 2015-05-30 19:32:27 +00:00
Christian Grothoff aecadc41d2 -version bump 2015-05-29 10:21:43 +00:00
Christian Grothoff f2f5b55550 fix digest authentication with escaped urls, as reported on mailinglist 2015-05-29 10:20:53 +00:00
Christian Grothoff dd80b6137d bump 2015-05-18 21:18:26 +00:00
Christian Grothoff c549988da8 fix typo (#3789) 2015-05-16 19:08:50 +00:00
Christian Grothoff a67363392b From ML:
Hey,

I'm debugging a problem with a crash in MHD_select_thread.  We had
MHD_start_daemon_va fail while creating worker threads with the following
error: "file descriptor for worker control pipe exceeds maximum value".  We
know what caused this error and are fixing it.  But the problem was that a
MHD_select_thread worker thread was left running in the background after
MHD_start_daemon_va returned failure.  I think the problem is from this
code in the thread_failed case in daemon.c:

  /* Shutdown worker threads we've already created. Pretend
     as though we had fully initialized our daemon, but
     with a smaller number of threads than had been
     requested. */
  daemon->worker_pool_size = i - 1;
  MHD_stop_daemon (daemon);
  return NULL;

From the code, it looks like "i" is actually the number of threads that
were successfully created, so the "i - 1" in this code will leave an extra
thread hanging since MHD_stop_daemon will clean up one less thread than it
should.  I'll probably try to work up a test to verify removing the "- 1"
is correct, but that could take me some time so I wanted to make sure I
wasn't missing something obvious before heading down that path.

~JareD

He is right, this patch fixes it.
2015-05-13 09:35:33 +00:00
Evgeny Grin (Karlson2k) 9452c700f2 fix: gnutls_certificate_set_x509_key_mem2 was actually added in GnuTLS 3.1.11 2015-05-07 18:20:38 +00:00
Evgeny Grin (Karlson2k) 5e7f4c65f4 update ChangeLog 2015-05-07 17:09:29 +00:00
Evgeny Grin (Karlson2k) 5758ff1992 microhttpd.h: bump MHD_VERSION 2015-05-07 17:04:52 +00:00
Evgeny Grin (Karlson2k) 16fc241e3c w32 VS project: add support for build for XP, internally optimize project files 2015-05-07 17:04:45 +00:00
Evgeny Grin (Karlson2k) 6092a01a48 tests: replace '#ifdefs' with 'MHD_is_feature_supported()' 2015-05-07 17:04:37 +00:00
Evgeny Grin (Karlson2k) 611597070c configure: add support for "--enable-poll"
Conflicts:
	configure.ac
2015-05-07 17:04:27 +00:00
Evgeny Grin (Karlson2k) b44ee80556 Define and use system-independent wrapper macro for poll() 2015-05-07 17:04:22 +00:00
Evgeny Grin (Karlson2k) cb83913d0e Check for poll() function, use HAVE_POLL macro 2015-05-07 17:04:10 +00:00
Evgeny Grin (Karlson2k) 3593a519b7 Replace variable-sized array with malloc()/free() 2015-05-07 17:04:02 +00:00
Evgeny Grin (Karlson2k) 633e5a1108 daemon.c: fix typos 2015-05-07 17:03:55 +00:00