Commit Graph
285 Commits
Author SHA1 Message Date
Christian Grothoff 22941cd1b6 -fix reactivating plibc 2013-08-07 22:05:53 +00:00
Christian Grothoff 35d4603ed1 -fixing ChangeLog 2013-08-07 09:05:08 +00:00
Christian Grothoff 36ac797380 -use more portable rand instead of random 2013-08-07 06:19:33 +00:00
Christian Grothoff f55c9a8e98 -fix connect/content-length handling 2013-08-02 21:42:29 +00:00
Christian Grothoff 7056c9e811 -fix #2968 2013-07-28 14:41:40 +00:00
Christian Grothoff a559950eb8 -fix combining HTTPS and EPOLL 2013-07-20 10:36:26 +00:00
Christian Grothoff 1237387390 adding experimental turbo mode 2013-07-19 15:51:45 +00:00
Christian Grothoff 32d7b92ba7 -cleanup connections also if MHD_run_from_select is used 2013-07-19 08:05:35 +00:00
Christian Grothoff b99be60d5d -packaging 0.9.28 2013-07-19 07:59:29 +00:00
Christian Grothoff 282386193c eliminate shutdown calls that are not required, strictly speaking 2013-07-14 17:59:09 +00:00
Christian Grothoff ccdf83cd04 name MHD worker threads 2013-07-14 17:38:24 +00:00
Christian Grothoff 6e07994a8b -fixing #2899: allow clients to customize MHD_BUF_INC_SIZE via option 2013-07-05 10:12:10 +00:00
Christian Grothoff 9fe0e9d411 Adding support for using epoll for the MHD event loop 2013-07-04 15:29:56 +00:00
Christian Grothoff d9ab40f532 -cleaner behavior with respect to stopping to read pipelined requests 2013-06-28 12:07:11 +00:00
Christian Grothoff 05d1a633b1 improving build system to tolerate missing libraries for libmicrospdy 2013-05-21 12:35:28 +00:00
Christian Grothoff cfea15fe53 -fix 2886 2013-05-20 10:30:32 +00:00
Christian Grothoff a39c6c5206 -2nd attempt to fix #2859, this time things look much better 2013-05-15 20:04:11 +00:00
Christian Grothoff f35fdf4b7c -fixing #2859 2013-05-06 10:49:23 +00:00
Christian Grothoff af157f337a -chlog 2013-05-05 19:44:54 +00:00
Christian Grothoff 7f193935fa releasing 0.9.27 2013-05-05 18:25:32 +00:00
Christian Grothoff 888e39055f adding support for quiesce 2013-04-26 09:00:01 +00:00
Christian Grothoff 1a6f22b489 finished with demonstrator 2013-03-31 21:18:03 +00:00
Christian Grothoff 7b8fb41d1e -clarify benchmark result 2013-03-31 19:48:11 +00:00
Christian Grothoff 4f55d5dd15 -benchmark 2013-03-31 19:18:33 +00:00
Christian Grothoff 39affe6c56 adding MHD_run_from_select to API 2013-03-31 18:28:43 +00:00
Christian Grothoff 5b45f52e77 bump, changelog 2013-03-31 18:06:37 +00:00
Christian Grothoff 99ce9f42e1 releasing 0.9.26 2013-03-29 16:23:40 +00:00
Christian Grothoff aa8465c711 -fixing #2818 2013-03-07 09:13:40 +00:00
Christian Grothoff f6d108e3bc fix #2802 2013-03-04 12:47:09 +00:00
Christian Grothoff de9b039ee5 the cleanup mutex struct should not be directly copied and share used
by multiple thread, which cause crash on some platform,
e.g. ios/darwin

Ulion
2013-03-01 00:12:59 +00:00
Christian Grothoff 5d9bc9ead9 -releasing 0.9.25 2013-02-06 00:52:27 +00:00
Christian Grothoff fe480ef1ad fix #2733 2013-02-01 09:20:40 +00:00
Christian Grothoff ef3bdbd92e Hello,
could be possible to change declarations for arrays of strings in the file reason_phrase.c?

Currently it is static const char * []. This places all strings into .rodata section and pointers to them into LMA of .text and also into .data in VMA.

E.g. for an ARM Cortex M3 (flash + SRAM) compiled with a arm-none-eabi-gcc
static const char *one_hundred[] = {
  "Continue",
  "Switching Protocols",
  "Processing"
};


Strings "Continue", "Switching Protocols", "Processing" are stored in flash. Also an array with pointers to strings is stored in flash. In addition, this array is copied into SRAM (+16 bytes). If you would change it to "static const char * const one_hundred[]" ... it would occupy only flash.

and
struct MHD_Reason_Block
{
......
  const char * const * data;
};

I agree, it is not relevant on a PC but on most microcontroller the SRAM is a limiting factor not the rom(flash).

Best
Martin Velek
2013-01-30 12:26:27 +00:00
Christian Grothoff 49b0e0ce8f fix #2734 2013-01-29 20:44:22 +00:00
Christian Grothoff b1a0a07b65 fixing regression from January 6th 2013-01-26 20:42:29 +00:00
Christian Grothoff afb01406a3 return success even without optional \r\n 2013-01-11 22:34:56 +00:00
Christian Grothoff 3d0152c7bb allow 0-byte responses with response_from_callback 2013-01-06 20:21:31 +00:00
Christian Grothoff 28cba57e89 0924 2012-12-25 17:44:31 +00:00
Christian Grothoff 166909d2ce I was was having problems receiving data from a client using POST with chunked encoding.
It turns out this client is violating the HTTP spec by setting the "Transfer-Encoding: Chunked"
as well as "Content-Length: 0"

Here are the client headers:
  POST /ee4/live.isml/Streams(Encoder1) HTTP/1.1
  Transfer-Encoding: Chunked
  User-Agent: ExpressionEncoder
  Host: 10.11.1.29
  Content-Length: 0
  Connection: Keep-Alive
  Cache-Control: no-cache

This is what HTTP 1.1 spec says (in section 4.4):
  Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding. If the message does include
  a non- identity transfer-coding, the Content-Length MUST be ignored.

libmicrohttpd does the opposite of what the 4.4 section says if both headers are present.  It only uses the content-length and ignores the
chunked encoding.
I patched libmicrohttpd with the attached patch that does the opposite.  It ignores the content-length if chunked encoding is also specified.
And with that patch libmicrohttpd can be a publishing point for MS Expression Encoder.

What is your take on this?

-eivind
=> answer: follow the spec ;-)
2012-12-18 20:25:37 +00:00
Christian Grothoff d9f458b2e6 force transmission of connection: close header 2012-12-06 09:20:32 +00:00
Christian Grothoff 2027b939dd Matthew Mundell wrote:
Hi

We've been having some mysterious parameter loss of POST parameters in
OpenVAS's GSA.  This only happens with IE8 and Chrome.  We saw this with
libmicrohttpd 0.9.19 and 0.9.20.

The cause looks to be an error in libmicrohttpd.  Patch to 0.9.20 to
resolve below.

In post_process_multipart in postprocessor.c the PP_Init state calls
find_boundary to find the first boundary.  If there is junk before the
first boundary it just reads over the junk.  However, it is also reading
over the actual boundary when there was too little data to determine
whether the next character is the start of the boundary.

In the error case Chrome seems to sends the POST request in multiple
writes.  The first chunk includes a single "-" from the first boundary at
end of the headers.  Thus libmicrohttpd has a partial boundary to deal
with.

I guess Chrome intends to send just the headers but gets the count wrong
due to sending the initial P of the POST on its own (all the browsers do
that for some reason).  Firefox on the other hand sends the headers and the
body in a single write, so it always works.

Thanks, and thanks for libmicrohttpd!

Matt
2012-12-05 18:28:17 +00:00
Christian Grothoff 802d1322f2 Ship its own version of tsearch and friends if not provided by platform.
On GNU based systems the tree related functions (tsearch, tfind, tdestroy)
are provided by the libc (with the interface specification in search.h). On
non-GNU systems this functionality may or may not be available. That's the
case for Android which ships its own, simplified, version of libc called
Bionic. Bionic does not contains neither search.h nor an implementation of
the above mentioned functions.

This patch adds detection for the presence of search.h and if the header file
is not found, it uses an internal version of search.h and functions tsearch,
tfind, and tdestroy. The internal version is based on the source code from
FreeBSD and is compiled if and only if the configure script did not find the
search.h header file.
 -- Jan Janak
2012-11-08 21:35:38 +00:00
Christian Grothoff dc6f6a872e Trying to fix issue reported by Matthieu:
>>
I face an issue while handling big https posts with libmicrohttpd 0.9.22.
I'm using an "external" select based on MHD_get_fdset and MHD_run.

Let's assume 16K of encrypted data arrive on the socket.
When the data arrives, my select correctly returns and MHD_run is called.

Do_read will first call gnu_tls to decrypt the data.
Apparently gnu_tls reads the full 16K so starting here, from the point of
view of socket/select, there is no more data to read.

Do_read however presents a buffer of only 9K to gnu_tls to retrieve the data
(9K as the result of a try_grow_read_buffer call).
So gnu_tls returns 9K of clear data and keeps the rest 7K in its own buffer
I think.
Do_read handles the 9K and then MHD_run returns;

Since from the socket point of view no data is pending read, select will
then wait until it finally timeout.
Only after this timeout, MHD_run is run again and the remaining 7K are
correctly processed.

I found two dirty workarounds for this issue :
1/ increase the MDH_BUF_INC_SIZE to an arbitrarily large value so it will
always be greater than gnu_tls own buffers
2/ run multiple MHD_run after each select (let's say 10 times)

What do you think of this issue ?
What could be a cleaner way of handling this ?
<<
Approach: detect that we *might* be in this situation because TLS fills
the entire buffer we give to gnuTLS.  If so, set timeout to 0 and read
again.
2012-10-22 11:07:36 +00:00
Christian Grothoff 42c501a9c4 -fix #if WINDOWS problems reported by Luis Garcia on the mailinglist 2012-10-15 23:34:56 +00:00
Christian Grothoff ad74bf4b44 releasing 0.9.22 2012-09-01 18:51:43 +00:00
Christian Grothoff 305acdf03a allowing independent enabling/disabling of digest and basic authentication (Mantis #2525) 2012-09-01 18:47:23 +00:00
Christian Grothoff a22321bf1a fixing #2531 2012-08-30 19:17:17 +00:00
Christian Grothoff 9d80af66d5 use int instead of enums in va_arg calls 2012-08-21 12:37:36 +00:00
Christian Grothoff aaecd079b6 reduce xbuf_size as suggested by Martin Velek on mailinglist 2012-08-21 12:33:51 +00:00
Christian Grothoff 15e3b096a4 -releasing 0.9.21 2012-07-19 19:56:54 +00:00