Commit Graph
851 Commits
Author SHA1 Message Date
Christian Grothoff 9ea3d5ce7a -fix W32 build 2013-04-21 17:57:26 +00:00
Christian Grothoff f4db12e265 -bsd fix 2013-04-12 18:14:55 +00:00
Christian Grothoff 1a6f22b489 finished with demonstrator 2013-03-31 21:18:03 +00:00
Christian Grothoff 4b0588d78b add mime types to demo 2013-03-31 20:22:02 +00:00
Christian Grothoff 1b07d1a57c -updating benchmark to use new API 2013-03-31 18:34:49 +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 cd4a497678 document sizes better 2013-03-31 18:03:39 +00:00
Christian Grothoff 49e8a61159 optimize post processor block size 2013-03-31 18:03:25 +00:00
Christian Grothoff 1d2db05d10 optimize read buffer size 2013-03-31 18:03:12 +00:00
Christian Grothoff 09f824e702 -formatting 2013-03-31 17:02:49 +00:00
Christian Grothoff 82298b29d4 -formatting 2013-03-31 17:02:32 +00:00
Christian Grothoff dbc57ff2f0 -formatting 2013-03-31 17:02:07 +00:00
Christian Grothoff 61456e4b13 -towards a nicer demo 2013-03-30 23:52:59 +00:00
Christian Grothoff 00af4350bd -starting more complex demo 2013-03-30 23:45:39 +00:00
Christian Grothoff bd3f0576c8 -fix build issue 2013-03-30 21:23:42 +00:00
Christian Grothoff 155fcf546f -renaming for consistency 2013-03-29 16:16:02 +00:00
Christian Grothoff c5cda7e3a3 -renaming for consistency 2013-03-29 15:59:58 +00:00
Christian Grothoff c7818b51b5 -renaming for consistency 2013-03-29 15:57:58 +00:00
Christian Grothoff bcc8e2ae2f -renaming for consistency 2013-03-29 15:49:05 +00:00
Christian Grothoff 12d00e74a7 -renaming for consistency 2013-03-29 15:47:51 +00:00
Christian Grothoff d606f05903 -oops 2013-03-22 09:44:56 +00:00
Christian Grothoff aa8465c711 -fixing #2818 2013-03-07 09:13:40 +00:00
Christian Grothoff 26ed57fcf9 testcase for #2783 2013-03-04 13:42:40 +00:00
Christian Grothoff f6d108e3bc fix #2802 2013-03-04 12:47:09 +00:00
Christian Grothoff 16cab0b43a -test case for %A0-issue reported on the list 2013-03-02 02:46:47 +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 08ce8b3916 testcase for #2733 2013-02-01 09:01:10 +00:00
Christian Grothoff 1e5b73e684 more consts 2013-01-30 12:23:21 +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 1a3cf8efd0 -bump 2013-01-07 06:28:53 +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 3c0a2695f8 -bump 2012-12-05 18:28:48 +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 5eb408d091 -new API proposal 2012-11-25 13:12:04 +00:00
Christian Grothoff 25e72ff2bf -search.h begone 2012-11-08 21:30:28 +00:00
Christian Grothoff 60af694fd1 -include tsearch.h only where needed, use local version if OS does not support it 2012-11-08 21:28:35 +00:00
Christian Grothoff 764c1a14ee -do not include search.h in platform.h, will be included in daemon.c 2012-11-08 21:26:41 +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 d460042ef6 increase timeouts to escape problems with time_wait 2012-10-08 13:02:40 +00:00
Christian Grothoff 704717f23f -getting rid of cparser warning 2012-09-30 21:29:59 +00:00