EPOLL with external threading.
Third, do you plan to provide a new version soon?
Best regards
José Bollo
On Tue, 11 Apr 2017 18:29:04 +0200
José Bollo wrote:
> Hi all,
>
> I just found time now to integrate the work you did last summer
> for upgrading connections. Seems to work out of the box, but...
>
> First a remark: I was previously trying to allocate ressources for the
>
On Tue, 11 Apr 2017 20:04:37 +0300
Evgeny Grin wrote:
> Hi José,
>
> On 11.04.2017 19:55, José Bollo wrote:
> > On Tue, 11 Apr 2017 18:29:04 +0200
> > José Bollo wrote:
> >
> >> I just found time now to integrate the work you did last summer
> >>
one that way. But now I have to handle 2 function:
one for the creation and one for attaching the socket (or the stuff).
Because there is a negociation of protocol and thus I use tables, I
have to update tables and redesign things.
But I'm happy to get a solution from MHD instead of having
e || NULL == connection->response->upgrade_handler
or
NULL != connection->response && NULL == connection->response->upgrade_handler
The first is prefered because it is probably safer to close the
connection in that case.
Change-Id: Ie6e7fc165f7fe3635ade0952bb34a0b937d38716
Sig
On Thu, 4 May 2017 23:36:23 +0300
Evgeny Grin wrote:
> Thanks! Applied.
>
Hello Evgeny,
After thinking about the issue, I guess that it is a serious
vulnerability.
I guess that a simple curl request to a server running 0.52 or 0.53 can
raise the SEGV.
IMHO if
curl http://www.myserver.org/
Hi
Was there a change in how suspend/resume works?
I observe that responses are no more send after resuming.
Best regards
José Bollo
On Fri, 5 May 2017 21:09:21 +0300
Evgeny Grin wrote:
> Hi José,
>
> Shouldn't be any change.
okay, thank you.
> Could you provide minimal example?
I'll investigate from Tuesday and will provide further feedback.
Best regards
José
On Fri, 5 May 2017 21:09:21 +0300
Evgeny Grin wrote:
> Hi José,
>
> Shouldn't be any change.
> Could you provide minimal example?
>
Hi Evgeny,
I was busy yesterday but I now have an example showing the regression.
I send it attached. I tested it against current master version
(917342b3fb05475
On Wed, 10 May 2017 09:31:22 +0200
José Bollo wrote:
{snip}
>
> To circumvent it, you can replace #if 0 with #if 1, leading to call
> MHD_run one more time. So there is a workaround.
In fact I'am actually enforced to call it 3 times to get all the
output because I
On Wed, 10 May 2017 21:57:17 +0300
Evgeny Grin wrote:
> On 10.05.2017 10:31, José Bollo wrote:
> > On Fri, 5 May 2017 21:09:21 +0300
> > Evgeny Grin wrote:
> >> Shouldn't be any change.
> >> Could you provide minimal example?
> >
> >
>
On Thu, 11 May 2017 11:07:49 +0300
Evgeny Grin wrote:
> You already can try new version from git master.
I already tried using git://gnunet.org/libmicrohttpd, SHA
917342b3fb0547523f2b4c6e607bb2ffd9cacdfd as witten in
http://lists.gnu.org/archive/html/libmicrohttpd/2017-05/msg00029.html
If you
On Thu, 11 May 2017 14:48:52 +0300
Evgeny Grin wrote:
First, I just tried the latest commit
(787bfd1859db22c58271f287dfcb505c0052edd3): Do not add any "Connection"
headers for "upgrade" connections.
My issue was still here but...
> "At least one time" - correct approach.
> May be more calls are
On Thu, 11 May 2017 15:49:43 +0300
Evgeny Grin wrote:
> On 11.05.2017 15:26, José Bollo wrote:
> > First, I just tried the latest commit
> > (787bfd1859db22c58271f287dfcb505c0052edd3): Do not add any
> > "Connection" headers for "upgrade" connecti
On Thu, 11 May 2017 22:56:58 +0300
Evgeny Grin wrote:
> Hi José,
>
> On 11.05.2017 16:13, José Bollo wrote:
> >>> First, I just tried the latest commit
> >>> (787bfd1859db22c58271f287dfcb505c0052edd3): Do not add any
> >>> "Connection" head
1 for testing the
case and adapt my code?
#define MHD_VERSION 0x00095901
- in my case, the resource is not used and was released in the upgrade
callback. Is there a way to force the con_cls of a connection? If
yes I can release the resources earlier.
Best regards
José Bollo
;
Hello Sylvio,
I'm using LMHD for websocket-ing. I point you a central file that may
help (or not -hope to not confuse you-).
https://git.automotivelinux.org/src/app-framework-binder/tree/src/afb-websock.c
Best regards
José Bollo
> Thank you!
>
> On Wed, Sep 5, 20
and MHD_USE_NO_LISTEN_SOCKET
together is unsupported. So it doesn't work. listen_fd is -1 always.
I think that my expectation is valuable. Do you agree?
Best regards
José Bollo
On Tue, 30 Oct 2018 15:51:19 +0100
José Bollo wrote:
> Hi,
>
> I try to add the selection of the interfaces to serve on MHD. I was
> using MHD_USE_EPOLL and was managing to include the epoll in the
> external main loop with MHD_get_daemon_info(daemon,
> MHD_DAEMON_INFO_E
eanup. Are you volunteer?
> Thank you for sharing!
You are welcome. I just hope your trial will be successful easily.
Best regards
José
> On Thu, Oct 11, 2018 at 4:22 AM José Bollo wrote:
>
> > On Mon, 8 Oct 2018 23:41:02 -0300
> > silvioprog wrote:
> >
> > &
On Tue, 30 Oct 2018 16:07:50 +0100
José Bollo wrote:
just to be sure that you dont miss the patch (tested with success here)
> The patch below seems okay:
>
>
> diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
> index cd2ca189..b877e560 100644
> --- a/src/m
please find attached a patch that allows to set/unset MHD_USE_TLS
without being enforced to add/remove HTTPS options.
Best regards
José Bollo
From b36db063495a1d2e185a491f42560294fe88ba33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Bollo?=
Date: Tue, 4 Dec 2018 15:45:12 +0100
Subject
On Thu, 24 Jan 2019 05:22:35 +0100
Christian Grothoff wrote:
> You're not incorrect, but likely the first one to try this. I don't
> recall anyone ever implementing this feature for uploads. Is there a
> good reason why you need it? Usually clients telling the server
> up-front how big the upload
On Tue, 29 Jan 2019 16:16:59 +0100
Moritz Warning wrote:
> Hi,
>
> can someone point me to an example of using websockets with
> libmicrohttpd?
>
> thanks,
> mwarning
>
I implemented WS over LMHD. Try to pull starting from function
check_websocket_upgrade in
https://git.automotivelinux.org/sr
many dependencies). The work is not so hard but it is to be
made.
But it is a recurrent question. So a tiny implementation could help.
I'll try to isolate some essential code and provide something
more useful. When? I'll try to do it soon.
Best regards
José
>
> best,
>
> On
linux. People on Mac or BSD are welcome to submit issues or pull
requests. People of windows also of course.
Best regards
José Bollo
it.
Best regards
José
>
> best,
>
> On Wed, Jan 30, 2019 at 4:17 PM José Bollo wrote:
>
> > I implemented WS over LMHD. Try to pull starting from function
> > check_websocket_upgrade in
> >
> > https://git.automotivelinux.org/src/app-framework-binder
t;
> > But, I have two questions: is it very difficult to do a minimal WS
> > example to distribute in the MHD examples? If so, will mark the
> > #5501 <https://gnunet.org/bugs/view.php?id=5501> as 'won't fix' and
> > close the issue. The other ques
https://gitlab.com/jobol/lmhd-ws/issues>? If so,
> I'll open a new issue as feature-request to build the library on
> Windows using the MSYS2 tools http://www.msys2.org .
Hello Sylvio, an issue is very welcome.
> Thank you! (y)
>
> On Tue, Feb 5, 2019 at 6:56 AM José Bo
open a new issue as feature-request to build the library on
> > Windows using the MSYS2 tools http://www.msys2.org .
> >
> > Thank you! (y)
> >
> > On Tue, Feb 5, 2019 at 6:56 AM José Bollo wrote:
> >
> >> On Sun, 3 Feb 2019 22:35:13 -0300
> >>
commit cc5032b85, it always returns NULL because the 2nd
parameter is no more treated as a bit mask.
My feeling is that bit mask was cool to have but it is up to you to
decide how to follow up.
Best regards
José Bollo
g except ctrl+C or killed.
It leads me to the question: "is there an easy way to serve in main
thread?" (by easy I mean without rewriting an external polling loop as
shown in example fileserver_example_external_select.c) Did I missed
some option?
Best regards
José Bollo
On Mon, 2 Dec 2019 15:04:52 +0100
José Bollo wrote:
rereading comment of MHD_USE_INTERNAL_POLLING_THREAD my question looks
stupid
sorry for the noise
> Hi all,
>
> I searched in examples how to "block" in main thread on serving files
> but I only found examples with t
On Mon, 2 Dec 2019 15:08:39 +0100
José Bollo wrote:
> On Mon, 2 Dec 2019 15:04:52 +0100
> José Bollo wrote:
>
> rereading comment of MHD_USE_INTERNAL_POLLING_THREAD my question looks
> stupid
No in fact the question is serious. There is no simple way to let run
MHD on the
On Mon, 2 Dec 2019 17:41:09 +0100
Christian Grothoff wrote:
> On 12/2/19 4:49 PM, José Bollo wrote:
> > On Mon, 2 Dec 2019 15:08:39 +0100
> > José Bollo wrote:
> >
> >> On Mon, 2 Dec 2019 15:04:52 +0100
> >> José Bollo wrote:
> >>
> >>
On Mon, 2 Dec 2019 22:03:51 +0100
Christian Grothoff wrote:
> On 12/2/19 9:55 PM, José Bollo wrote:
> >
> > I tried to write something like "while(true) MHD_run();" but strace
> > showed its inefficiency.
>
> Oh my. Yes, that'd be bad.
>
> >
Hi there,
After a switching protocol for web socket for example, libmicrohttp
keeps the socket under the table until a call to MHD_upgrade_action
(something, MHD_UPGRADE_ACTION_CLOSE).
So, it enforces to have a link to libmicrohttp when using such switched
protocol socket.
Is it possible to brea
re what I'm missing?
> Happy hacking!
>
> Christian
>
> On 11/24/20 3:23 PM, José Bollo wrote:
> > Hi there,
> >
> > After a switching protocol for web socket for example, libmicrohttp
> > keeps the socket under the table until a call to MHD_upgrade
On Tue, 24 Nov 2020 16:01:48 +0100
Christian Grothoff wrote:
> On 11/24/20 3:48 PM, José Bollo wrote:
> > On Tue, 24 Nov 2020 15:34:03 +0100
> > Christian Grothoff wrote:
> >
> >> Hi Jose,
> >>
> >> Well, technically you can dup() around this
On Tue, 24 Nov 2020 23:12:43 +0100
Christian Grothoff wrote:
> On 11/24/20 4:50 PM, José Bollo wrote:
> > What about if in some future an option to MHD_upgrade_action would
> > enable to "extract" the socket? Something like:
> >
> > MHD_upgrade_actio
On Thu, 26 Nov 2020 12:38:24 +0100
Christian Grothoff wrote:
> On 11/26/20 8:31 AM, José Bollo wrote:
> > On Tue, 24 Nov 2020 23:12:43 +0100
> > Christian Grothoff wrote:
> >
> >> On 11/24/20 4:50 PM, José Bollo wrote:
> >>> What about if in s
On Thu, 26 Nov 2020 13:19:51 +0100
Christian Grothoff wrote:
> On 11/26/20 1:14 PM, José Bollo wrote:
> >> For child processes, not really: you can even do the dup()ing only
> >> after fork() if you manually clear the close-on-exec flag. So you
> >> don't ne
regards
José Bollo
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/ SHA /
#define SHA1_DIGEST_LENGTH 20
/* The SHA1 structure: */
typedef struct {
uint32_t state[5];
uint64_t length;
union
08:18 +0100
José Bollo wrote:
> Hello,
>
> My code uses LMHD embedded with its EPOLL mechanism. Part of that code
> deals with upgrading to websocket. It then call somewhere:
>
> response = MHD_create_response_for_upgrade(
>upgrade_to_websocket, memo);
>
ise, lets go for handling specifically the squared corner case of
the wheel.
Hopefully I convinced you.
Best regards
José
>
>
> Happy hacking!
>
> Christian
>
> On 12/10/20 4:08 PM, José Bollo wrote:
> > Hello,
> >
> > My code uses LMHD embedded with its EPO
h operations later based on
> other things in your external event loop, you will need some kind of
> signalling.
>
> Happy hacking!
>
> Christian
>
> On 1/5/21 10:17 AM, José Bollo wrote:
> > On Sun, 3 Jan 2021 14:22:25 +0100
> > Christian Grothoff wrote:
> >
Hi,
My program sends answers in threads and runs the main MHD loop on
external event in an other thread and I get crashes. I'm suspecting
LMHD because valgrind point out that the memory for response is
used after free in a kind of race condition between internals of MHD.
Is it a known issue fixed
On Thu, 23 Sep 2021 18:14:24 +0300
Evgeny Grin wrote:
> Hi José,
Hi Evgeny,
> For sure you can run MHD with "external poll" mode, but you must
> ensure that only single thread is calling MHD_run() at any given
> moment of time.
Okay, that is a good hint, thanks. I'm going to first track concur
On Thu, 23 Sep 2021 19:57:23 +0300
Evgeny Grin wrote:
> On 23.09.2021 18:43, José Bollo wrote:
> >> For sure you can run MHD with "external poll" mode, but you must
> >> ensure that only single thread is calling MHD_run() at any given
> >> moment of ti
On Thu, 23 Sep 2021 18:12:39 +0200
Markus Doppelbauer wrote:
> > ... because valgrind point out ...
>
> You should replace (slow) valgrind with (fast) address-sanatizer.
> Simply tell GCC (or clang) to compile with: -fsanitize=address -fno-
> omit-frame-pointer
>
Thank you Markus for the
Hi Evgeny, Hi all,
Firstly, protecting MHD_run made the job, the crash disappears and
valgrind is happy. Thank you for that efficient support.
Secundly, I'm still seeing and investigating an issue. Sometime, the
queued response (MHD_queue_response) is not sent. Here again, I think
that it is a ra
Sep 2021 14:56:36 +0200
José Bollo wrote:
> Hi Evgeny, Hi all,
>
> Firstly, protecting MHD_run made the job, the crash disappears and
> valgrind is happy. Thank you for that efficient support.
>
> Secundly, I'm still seeing and investigating an issue. Sometime
On Sat, 25 Sep 2021 17:35:42 +0300
Evgeny Grin wrote:
> Hi José,
>
> Thanks for the report!
>
> If MHD needs to (re-)run MHD_run() immediately MHD_get_timeout() must
> return zero timeout.
> You don't need to re-run it if no timeout is returned.
> Zero timeout if connection cleanup is pending
On Fri, 28 Jan 2022 11:15:20 +0100
Christian Grothoff wrote:
> That is something you cannot guarantee in C, basically ever. Libraries
> always require that they are called with correct arguments. Sure, a
> NULL pointer could be detected, but calling a function with a NULL
> pointer that is not d
o you agree that the use of
suspend/resume is a good idea? If yes, the patch should be upstreamed to
avoid the closing of the connection when "connection: upgrade\r\n"
appears.
Best regards
José Bollo
Le mercredi 20 avril 2016 à 18:03 +0300, Evgeny Grin a écrit :
>
> On 20.04.2016 15:28, José Bollo wrote:
> > I implement web-socket upgrading and it worked very well with firefox.
> > The bad happens when I use Chromium. The following little patch of the
> > function
Le Wed, 20 Apr 2016 20:42:48 +0300,
Evgeny Grin a écrit :
>
>
>
> Forwarded Message
> Subject: Re: [libmicrohttpd] upgrading connection
> Date: Wed, 20 Apr 2016 19:48:53 +0300
> From: Evgeny Grin
> To: libmicrohttpd@gnu.org
>
>
>
> O
appen on the connection and here yes, I can
imagine a leak. But it is IMHO the only case.
Please could check again whether the following patch that avoid to
close the connection when upgrade is called is valid or not.
Best regards
José Bollo
diff -Naur a/src/microhttpd/connection.c b/src/microh
Le mardi 17 mai 2016 à 13:38 +0200, Christian Grothoff a écrit :
> Done as of SVN 37180.
Hi, I sew that client of libmicrohttpd can now obtain the
suspended/resume state of a connection.
> I'll try to get to the rest of your e-mail later.
Impatient to read yiu.
Best regards
Le dimanche 29 mai 2016 à 20:53 +0200, Christian Grothoff a écrit :
> On 05/17/2016 09:53 AM, José Bollo wrote:
> >
> > Le mercredi 20 avril 2016 à 20:41 +0300, Evgeny Grin a écrit :
> > Please could check again whether the following patch that avoid to
> > close the
Le dimanche 29 mai 2016 à 20:53 +0200, Christian Grothoff a écrit :
> On 05/17/2016 09:53 AM, José Bollo wrote:
> >
> > Le mercredi 20 avril 2016 à 20:41 +0300, Evgeny Grin a écrit :
> > Please could check again whether the following patch that avoid to
> > close the
PING
I still think that the patch is a need.
In src/microhttpd/connection.c
-if ( (MHD_str_equal_caseless_ (end, "close")) ||
- (MHD_str_equal_caseless_ (end, "upgrade")) )
+if ( (MHD_str_equal_caseless_ (end, "close")) )
Best regards
José Bollo
Le vendredi 05 août 2016 à 20:19 +0530, Geetha Shanmugam a écrit :
> Hi,
> Is there a way we can use openssl library (instead of gnutls) with
> microhttpd?
very good question (but I can't answer)
to the header connection?
2- should the connection be close (or conversely should it be kept
alive)
Best regards.
José Bollo
diff -Naur a/src/microhttpd/connection.c b/src/microhttpd/connection.c
--- a/src/microhttpd/connection.c 2016-04-08 21:02:26.0 +0200
+++ b/src/microhttpd/connection.c 2016-
sure if this does everything we need.
>
>
> Thus, if you are interested in this functionality, please:
Yes I am.
> * try it now, check if the API does what you need and if not,
> let me know!
> * test it now, that way once we put it into a release we will
> likely have a more stable API and implementation!
I'll try to give you feedback around mid september.
Best regards
José Bollo
This topic is very interesting.
Is it the same issue when an external select/poll is used?
Best regards
José Bollo
Le mardi 25 octobre 2016 à 11:45 -0400, Tom Cornell a écrit :
> On Tue, Oct 25, 2016 at 04:11:12PM +0200, Christian Grothoff wrote:
> >
> > On 10/25/2016 03:59
66 matches
Mail list logo