Re: [libmicrohttpd] Double regarding suspended connection and pthread_exit

2020-03-16 Thread silvioprog
On Mon, Mar 16, 2020 at 4:29 PM Christian Grothoff wrote: > This seems kind-of OK (I personally think pthread_detach is always messy > and in 99.9% of cases a bad idea). Hm... Could you point the disadvantages of using detached threads? I'm a little newbie with this feature of pthreads. I'm go

Re: [libmicrohttpd] Double regarding suspended connection and pthread_exit

2020-03-16 Thread silvioprog
On Mon, Mar 16, 2020 at 7:37 PM Christian Grothoff wrote: > Usually, you will eventually find that you do need to wait on the thread > to finish for a controlled shutdown, and at that point it is then better > to keep the thread handles in some data structure so you can join. At > least I found t

Re: [libmicrohttpd] Double regarding suspended connection and pthread_exit

2020-03-16 Thread silvioprog
Complementing, I have done some tests resuming at "position 1" and the server doesn't lock. Should I use at that point? 🤔 (the MHD_resume_connection() inside ahc() in previous example was a typo) On Mon, Mar 16, 2020 at 9:27 PM silvioprog wrote: > The CTRL-C / SIGTERM will

Re: [libmicrohttpd] Double regarding suspended connection and pthread_exit

2020-03-16 Thread silvioprog
our code to be sure). You also > need a way to stop the 'long time processing of data' if you get the > SIGTERM, and then join the thread before calling MHD_stop_daemon(). > > On 3/17/20 1:39 AM, silvioprog wrote: > > Complementing, I have done some tests resuming at

[libmicrohttpd] Performance issues again (compared to latest Nginx)

2020-05-31 Thread silvioprog
Hi. I have been testing (again) MHD and Nginx with a static content and noticed MHD is around two times slower than Nginx, but I'm not sure if the slowness is related to MHD or something I'm doing wrong. *Test built with MHD* #include #include #include #define PAGE \ "\n\ \n\ \n\

[libmicrohttpd] Is there any plan to release 0.9.72?

2020-11-07 Thread silvioprog
Hi there. Is there any plan to release the stable version 0.9.72? Thank you! -- Silvio Clécio

Re: [libmicrohttpd] Is there any plan to release 0.9.72?

2020-11-09 Thread silvioprog
hout any notable new features. > > -- > Best Wishes, > Evgeny Grin > > > > 07.11.2020, 17:26, "silvioprog" : > > Hi there. > > Is there any plan to release the stable version 0.9.72? > > Thank you! > > -- > Silvio Clécio > > -- Silvio Clécio

Re: [libmicrohttpd] Assertion failure with raw "GET /" request

2020-12-02 Thread silvioprog
> We should indeed make a new release... This version is being awaited! 🙏 On Tue, Dec 1, 2020 at 7:29 PM Christian Grothoff wrote: > Hi Niels, > > I can confirm the issue, alas it was already fixed in Git master (by > Evgeny) in October. We should indeed make a new release... > > (Note: the as

Re: [libmicrohttpd] Update for websocket library

2021-10-17 Thread silvioprog
This is awesome news! Congratulations David, I'll test this new feature ASAP. 🎉 On Sun, Oct 17, 2021 at 4:42 PM Gausmann, David wrote: > Hi @all, > > some months ago I wrote an additional library for libmicrohttpd to add > support for the websocket protocol. > Christian and Evgeny added that lib

Re: [libmicrohttpd] Route lookups

2021-12-15 Thread silvioprog
Hi Gavin. I implemented routing support in my library (that uses MHD) using regex in PCRE2-style. Take a look at these two examples: 01. https://github.com/risoflora/libsagui/blob/master/examples/example_router_srv.c 02. https://github.com/risoflora/libsagui/blob/master/examples/example_router_va

Re: [libmicrohttpd] Passing data into MHD_start_daemon

2021-12-17 Thread silvioprog
Hi Gavin. I'm not sure if I understood properly, but, if you are trying to share your config instance to your request handle function, you can send it via MHD_start_daemon(), for example, supposing code at https://github.com/SentryPeer/SentryPeer/blob/99a5b5be48c788d9e5f4177725babc5a97e8f37e/src/h

Re: [libmicrohttpd] Passing data into MHD_start_daemon

2021-12-17 Thread silvioprog
You're welcome, glad it worked for you. 🙂 On Fri, Dec 17, 2021 at 2:23 PM Gavin Henry wrote: > Hi Silvio, > > Thanks. That's what I thought and what I was doing. The problem was > just the pointer I was passing in wasn't getting cast correctly in my > ahc_get. Newbie :-) > > All good now. > > Re

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.74 released

2021-12-19 Thread silvioprog
Thanks a lot for this new release! 🍻 On Sun, Dec 19, 2021 at 1:13 PM Evgeny Grin wrote: > Dear all, > > I'm very glad to finally announce the new release of GNU libmicrohttpd > library version 0.9.74. > This release brings a lot of fixes and improvements, and > important new features. > The most

Re: [libmicrohttpd] Let's Encrypt handler

2022-05-18 Thread silvioprog
Hi Gavin. For sure. Just followed the same Let's Encrypt steps for Nginx and it worked like a charm with MHD. Regards On Wed, May 18, 2022 at 3:08 PM Gavin Henry wrote: > Hi all, > > Has anyone done this before in their p

Re: [libmicrohttpd] Let's Encrypt handler

2022-05-18 Thread silvioprog
Oh yes, and also you can use a bot like Certbot or LEGO to make it easier. 🚀 On Wed, May 18, 2022 at 4:37 PM Gavin Henry wrote: > Thanks Silvio. > > In my head, I have just set up a "/.well-known" handler and > processing/serving up what

Re: [libmicrohttpd] Can't log client address

2022-08-24 Thread silvioprog
Can you try this function ? On Wed, Aug 24, 2022 at 12:29 PM klemens wrote: > try to log an incoming clients address, as suggested in > example 2 of the tutorial: > > get_client_adr (void *cls, const struct sockaddr *addr, sock

[libmicrohttpd] SEGFAULT after upgrading from 0.9.77 to 1.0.1

2024-02-26 Thread silvioprog
Hey guys. After upgrading MHD in my project, it is raising segfault, and seems like happening in any function that MHD uses to internally to access "connection->rq", like "MHD_basic_auth_get_username_password", "MHD_lookup_connection_value_n" etc.: https://github.com/risoflora/libsagui/actions/ru

Re: [libmicrohttpd] SEGFAULT after upgrading from 0.9.77 to 1.0.1

2024-02-26 Thread silvioprog
Hey Christian. =) Yes sure, I'll try to reproduce the problem and provide all the logs. On Mon, Feb 26, 2024 at 4:23 PM Christian Grothoff wrote: > Hi Silvio, > > Well, we didn't try to break anything with the update, so you shouldn't > have to change anything on your side either. Can you send

[libmicrohttpd] Do we have examples using the new MHD_run_wait function?

2024-02-26 Thread silvioprog
Hey guys! First of all, thanks a lot for this new feature! Seems like this function is exactly what I'm looking for to provide single thread support in my library. \o/ So, do we have any examples using this function? Thanks a lot! -- Silvio Clécio

Re: [libmicrohttpd] SEGFAULT after upgrading from 0.9.77 to 1.0.1

2024-02-26 Thread silvioprog
Problem fixed! \o/ I have a couple of test cases that call some MHD functions internally, but after creating fake MHD_Connections to pass to the functions instead of NULL the problem was fixed. Thanks a lot guys! On Mon, Feb 26, 2024 at 5:41 PM silvioprog wrote: > Seems like it will be h

Re: [libmicrohttpd] SEGFAULT after upgrading from 0.9.77 to 1.0.1

2024-02-27 Thread silvioprog
The problem was in my test cases, because it tries to mock MHD. Basically I just had to create fake instances like "struct MHD_Connection *con = sg_alloc(256)" and fixed the tests: https://github.com/risoflora/libsagui/commit/bd8304ebe439095312d7232aec5f88ad36a20157 On Tue, Feb 27, 2024 at 1:58 PM

Re: [libmicrohttpd] Do we have examples using the new MHD_run_wait function?

2024-02-27 Thread silvioprog
Mon, Feb 26, 2024 at 4:58 PM silvioprog wrote: > Hey guys! > > First of all, thanks a lot for this new feature! > > Seems like this function is exactly what I'm looking for to provide single > thread support in my library. \o/ > > So, do we have any examples using t

[libmicrohttpd] Is there any C example showing how to use the MHD_USE_SUSPEND_RESUME flag?

2015-09-25 Thread silvioprog
Hello, So, I did many searches on Google but I couldn't find any sample showing how to use this flag. =/ Can anyone send a small example writen in C? Thanks in advance! -- Silvio Clécio

Re: [libmicrohttpd] Is there any C example showing how to use the MHD_USE_SUSPEND_RESUME flag?

2015-09-25 Thread silvioprog
Hello Flavio, Firstly, thanks for share it! =) On Fri, Sep 25, 2015 at 6:44 PM, Flavio Ceolin wrote: [...] > I've used it on the project i'm working. Just take a look: > > > https://github.com/solettaproject/soletta/blob/master/src/lib/comms/sol-http-server-impl-microhttpd.c > I took a look on

Re: [libmicrohttpd] libmicrohttpd 0.9.45 released

2015-10-31 Thread silvioprog
Hello Christian and all, On Sat, Oct 31, 2015 at 12:04 PM, Christian Grothoff wrote: > Dear all, > > I'm happy to announce the release of libmicrohttpd 0.9.45, which > is mostly a bugfix release. > Thanks for this great library, I converted the C header to Pascal, and now I can use it with Free

Re: [libmicrohttpd] Anyone wants openssl support in libmicrohttpd?

2015-11-04 Thread silvioprog
On Wed, Nov 4, 2015 at 1:21 PM, Tomas Heran wrote: > Hi. > > Definitely count me in! > > Cheers, > Tomas > > On 11/04/2015 10:50 AM, Olaf Buddenhagen wrote: > >> Hi, >> >> My employer considers implementing optional support for openssl as an >> alternative to gnutls in libmicrohttpd, as CoreOS ap

[libmicrohttpd] Keep-alive and POST method

2015-11-05 Thread silvioprog
Hello, Is the keep-alive feature compatible only with GET method? See this log below, it compares the headers from MHD and NodeJS: === NodeJS === ... GET ... $ curl -I http://127.0.0.1:8080 HTTP/1.1 200 OK Content-Type: text/html Date: Thu, 05 Nov 2015 22:34:34 GMT *Connection: keep-alive* ..

Re: [libmicrohttpd] Keep-alive and POST method

2015-11-06 Thread silvioprog
load data that > we're now just dropping). > > Try handling the POST data "for real" (RTFM, and/or look at actual > examples!), and then you'll get your keep-alive from MHD as well. > > Happy hacking! > > Christian > > > On 11/05/2015 11:43 PM, silviop

Re: [libmicrohttpd] MHD in an environment with many requests

2015-11-08 Thread silvioprog
Oops ... :-) On Sun, Nov 8, 2015 at 11:20 PM, silvioprog wrote: > ... and them worked fine. > I meant: "and they". -- Silvio Clécio

Re: [libmicrohttpd] MHD in an environment with many requests

2015-11-08 Thread silvioprog
uld cause connections to be dropped. Please try 0.9.46. > > Happy hacking! > > Christian > > On 11/09/2015 03:20 AM, silvioprog wrote: > > Hello, > > > > I'm testing MHD in an environment with a lot of simultaneous requests, > and > > I noticed that it

Re: [libmicrohttpd] MHD in an environment with many requests

2015-11-09 Thread silvioprog
t a 2nd shot now :-). -Christian > > On 11/09/2015 07:59 AM, silvioprog wrote: > > Very nice. I'll try it this afternoon. :-) > > > > Is the 0.9.46 available only in SVN? I saw only the 0.9.45 at FTP link. > > > > Thank you! > > > > On Nov 9, 2015

[libmicrohttpd] Small upgrade for MHD home page

2015-11-12 Thread silvioprog
Hello, I took a look at the MHD home page, and it shows the only following versions: Linux libmicrohttpd-0.9.38.tar.gz Windows libmicrohttpd-0.9.17-w32.zip This versions are so outdated. :-( It should be (like NodeJS: https://nodejs.org/en/download/): Windows Binary 32 / 64 bits (.zip) Mac OS

Re: [libmicrohttpd] Why MHD latency is so high on Windows?

2015-11-16 Thread silvioprog
/hgmloofddffdnphfgcellkdfbfbjeloo On Sun, Nov 15, 2015 at 3:06 PM, silvioprog wrote: > Hello, > > I'm using MHD in production, so I noticed a small problem in a customer: > the MHD latency is very high. It is about 250ms. (Apache24 - 15ms; Nginx - > 2ms; NodeJS - 5ms; Jetty - 5ms; libevent

[libmicrohttpd] Why MHD latency is so high on Windows?

2015-11-16 Thread silvioprog
Hello, I'm using MHD in production, so I noticed a small problem in a customer: the MHD latency is very high. It is about 250ms. (Apache24 - 15ms; Nginx - 2ms; NodeJS - 5ms; Jetty - 5ms; libevent - 3ms) You can't reproduce it testing in localhost, so you need two machines. If you want to test tha

Re: [libmicrohttpd] Small upgrade for MHD home page

2015-11-16 Thread silvioprog
Hm... about Windows package, the problem is just to keep an old version on home page, because there is the first place that an user find the lib, and this very old version miss a lot of important fixes. :-/ I have two sugestions to distribute the Windows package on home page: 1. keep only the lat

Re: [libmicrohttpd] Why MHD latency is so high on Windows?

2015-11-17 Thread silvioprog
Hello Nils, I can't found any `select.c` file and PlibC entry. :-/ Is this file available in the latest MHD release? But, after your tip, I tried to debug the MHD sources, so I found a build flag called `TCP_FASTOPEN`, and after enable it in my cmake file, rebuilt the DLL and used the `MHD_USE_TC

Re: [libmicrohttpd] Small upgrade for MHD home page

2015-11-17 Thread silvioprog
5/2015 06:42 PM, silvioprog wrote: > Hm... about Windows package, the problem is just to keep an old version on > home page, because there is the first place that an user find the lib, and > this very old version miss a lot of important fixes. :-/ > > I have two sugestions to distribu

Re: [libmicrohttpd] Small upgrade for MHD home page

2015-11-17 Thread silvioprog
nybody else) wants to put up a binary. Note that you should sign it with *your* GnuPG key, I do not sign binaries created by other people. On 11/15/2015 06:42 PM, silvioprog wrote: > Hm... about Windows package, the problem is just to keep an old version on > home page, because there is th

Re: [libmicrohttpd] Why MHD latency is so high on Windows?

2015-11-18 Thread silvioprog
On Wed, Nov 18, 2015 at 10:20 AM, Evgeny Grin wrote: > Hi! > > libmicrohttpd was ported to use Windows API directly, so PlibC wrapper is > not used anymore. > Very nice. > According to MSDN docs there is no TCP_FASTOPEN flag on Windows: > https://msdn.microsoft.com/ru-ru/library/windows/deskto

Re: [libmicrohttpd] Why MHD latency is so high on Windows?

2015-11-18 Thread silvioprog
Is there someone that needs performance in MHD on Windows besides me? :-D I need to test it, I'm going to do it these days. For now, I disabled the `TCP_FASTOPEN` flag and left it with high latency, until I figure out how this works on Windows, once it doesn't offer TFO support. On Wed, Nov 18, 2

[libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-11-19 Thread silvioprog
Hello, About the `TCP NODELAY` feature, it reduces the network latency on many operating systems, and this patch allows MHD to disable it. Popular servers like nginx allows to enable the `TCP NODELAY` feature[1]. You can see more details about this patch here in this topic[2]. Feel free to chang

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-11-19 Thread silvioprog
If you apply this patch, please update the MHD version to 0x00094603! :-) On Fri, Nov 20, 2015 at 12:43 AM, silvioprog wrote: > Hello, > > About the `TCP NODELAY` feature, it reduces the network latency on many > operating systems, and this patch allows MHD to disable it. Popular se

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-11-20 Thread silvioprog
Very nice Evgeny, I'm expecting anxiously this feature! :-D On Fri, Nov 20, 2015 at 6:30 AM, Evgeny Grin wrote: > Hi, Silvio > > You patch will turn on TCP_NODELAY globally upon request, but it should be > used at specific moments as Martin Bonner pointed in > http://lists.gnu.org/archive/html/l

Re: [libmicrohttpd] Small upgrade for MHD home page

2015-11-20 Thread silvioprog
Hello again, I'm trying to solve a MHD latency problem on Windows system, and I'm very happy by see the community helping in this task. (this is the best think of MHD!) After solve it I'll send a Widnows package ASAP! On Wed, Nov 18, 2015 at 12:08 AM, silvioprog wrote: > Oop

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-11-30 Thread silvioprog
Hello Evgeny, Any news about this patch? Do you need help? If you are busy I can do it for you. :-) On Fri, Nov 20, 2015 at 6:30 AM, Evgeny Grin wrote: > Hi, Silvio > > You patch will turn on TCP_NODELAY globally upon request, but it should be > used at specific moments as Martin Bonner pointe

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-12-01 Thread silvioprog
Very nice Evgeny! :-) Let me know when this feature was implemented so that we can release the Windows package on MHD home page. :-) On Mon, Nov 30, 2015 at 1:30 PM, Evgeny Grin wrote: > Patch for *BSD and Darwin platforms is already added. > We are developing solution for Win32 platform on whi

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-12-03 Thread silvioprog
015, 19:12, "silvioprog" : Very nice Evgeny! :-) Let me know when this feature was implemented so that we can release the Windows package on MHD home page. :-) On Mon, Nov 30, 2015 at 1:30 PM, Evgeny Grin wrote: Patch for *BSD and Darwin platforms is already added. We are developing solution f

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-12-03 Thread silvioprog
You did an excelent job. I compiled it with the latest mingw-w64 release and now MHD latency is very low, about 25ms. Are you using the TCP_NODELAY? If so, is there some define to enable it in my CMake file? The only note is that using it I could get a latency about 5ms. Yes, 25ms is very good, but

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-12-04 Thread silvioprog
Hm... My test is from Windows client to Windows server. I'll retest it using some binary tool and back to show the result here ... On Fri, Dec 4, 2015 at 8:36 AM, Evgeny Grin wrote: > Did test it using MinGW-w64 and VS builds. Windows machine was used as > server, FreeBSD, Solaris and Linux mach

Re: [libmicrohttpd] libmicrohttpd 0.9.47 released

2015-12-04 Thread silvioprog
Very good news! 👏 I'm going to send the Windows binaries to update it at home page. I just need to confirm Evgeny if this task will be done by him or me (he seems more indicated because his expansive knowledge about MHD). On Fri, Dec 4, 2015 at 10:11 AM, Christian Grothoff wrote: > Dear all, >

[libmicrohttpd] Compiling MHD on MinGW-w64

2015-12-04 Thread silvioprog
Hello, Now MHD implements important features for Windows (thanks Evgeny!), so it is time to update the latest Windows package (libmicrohttpd-0.9.17-w32.zip) at MHD home page. This topic is just to confirm if the used environment is OK: - original Windows Professional 7 64 bits; - latest ve

Re: [libmicrohttpd] libmicrohttpd 0.9.47 released

2015-12-04 Thread silvioprog
It is OK Evgeny! I did a test using a HTTP client written in C and now MHD latency is 1-4ms. :-) On Fri, Dec 4, 2015 at 2:05 PM, silvioprog wrote: > Very good news! 👏 > > I'm going to send the Windows binaries to update it at home page. I just > need to confirm Evgeny if this

Re: [libmicrohttpd] [PATCH] Added support for TCP NODELAY

2015-12-04 Thread silvioprog
Oops, I sent the answer in wrong topic. Sorry. ^^' But it's OK Evgeny, I did a test using a HTTP client written in C and now MHD latency is about 1-4ms. :-) On Fri, Dec 4, 2015 at 1:27 PM, silvioprog wrote: > Hm... My test is from Windows client to Windows server. I'll rete

[libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-04 Thread silvioprog
Hello, I'm trying to use Keep-Alive in the `MHD_USE_THREAD_PER_CONNECTION` mode with the `MHD_OPTION_CONNECTION_TIMEOUT` option, however, when timeout is ends, it locks the client that can't get more responses from my MHD server. Is very easy to reproduce that, you just: . compile and run this d

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-04 Thread silvioprog
Oops, I forgot to inform my environment. ^^' It is Windows 7 64 bits and MHD 0.9.47 compiled with MinGW-w64. I don't know if it happens on Linux too. On Fri, Dec 4, 2015 at 9:02 PM, silvioprog wrote: > Hello, > > I'm trying to use Keep-Alive in the `MHD_USE_THREAD_PER

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-04 Thread silvioprog
Strange... when I call the `MHD_get_daemon_info()` function it unlock the clients. :-/ This[1] example doesn't lock the clients. Do I need to trigger the `MHD_get_daemon_info()` always? [1] http://pastebin.com/dfykB1US On Fri, Dec 4, 2015 at 9:21 PM, silvioprog wrote: > Oops, I f

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-06 Thread silvioprog
Hello bro, Yes, it killed the problem definitively! 3:) I did many tests using different machines and now it works like a charm, thanks a lot for this fix. However ( ^^' ), I saw a small problem, but it is related only to the keep-alive feature, even using previous versions like 0.9.46: when I u

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-07 Thread silvioprog
Hello, I have good news in the test 2, however in test 3 ... @Christ, on Linux I got 0.00% erros. MHD is so fast on Linux that I believe that it can support C10K problem. :-) @Evg, do I need to change the `FD_SETSIZE` and the MHD source befor

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-07 Thread silvioprog
On Mon, Dec 7, 2015 at 5:27 PM, Christian Grothoff wrote: > [...] > Well, on Linux C10k is easy these days. We had people using MHD that in > practice had what you might call the C100k problem, and that was doable > ;-). > Very good! Currently I'm using it only as embedded server providing invoi

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-08 Thread silvioprog
nt column is `Error`, and it is 0,00% to MHD too! :-) On Tue, Dec 8, 2015 at 9:05 AM, Evgeny Grin wrote: > > 07.12.2015, 22:58, "silvioprog" : > > Hello, I have good news in the test 2, however in test 3 ... > > @Evg, do I need to change the `FD_SETSIZE` and the MHD so

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-08 Thread silvioprog
On Tue, Dec 8, 2015 at 3:33 PM, silvioprog wrote: > [...] > And Evg, sorry if I'm being boring, but, can you send me the compiled 32 > and 64 binaries? I can compile that, but I don't know if my environment is > the better to compile MHD. The 32 bit binary that I compiled h

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-08 Thread silvioprog
Hm... so I did something wrong there. The commands that I did was (built for production): *$ ./configure --disable-doc --disable-examples --disable-messages --enable-https=no --disable-bauth --disable-dauth --disable-curl* $ make $ make install Ie, without HTTPS support, and I used the latest Min

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-08 Thread silvioprog
I forgot other information... I use thread in my own app, so I disable the MHD threads, but MHD still depending on `libwinpthread-1.dll` lib. Is this a normal behaviour or I need to pass some flag before compile it? On Tue, Dec 8, 2015 at 5:29 PM, silvioprog wrote: > Hm... so I did someth

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-08 Thread silvioprog
Yes. The summary is (command: $ ./configure --disable-doc --disable-examples --disable-messages --enable-https=no --disable-bauth --disable-dauth --disable-curl): configure: libmicrohttpd 0.9.47 Configuration Summary: Cross-compiling: no Operating System: mingw32 Threading lib: w32

Re: [libmicrohttpd] Problem with Keep-Alive and MHD_OPTION_CONNECTION_TIMEOUT in MHD_USE_THREAD_PER_CONNECTION mode

2015-12-09 Thread silvioprog
After your hints now I have ~90KB for 32 bits and ~86KB for 64 bits. My commands was (I don't need HTTP *auth because I use JWT auth): $ make clean $ CFLAGS='-Os -s' ./configure --disable-doc --disable-examples --disable-messages --enable-https=no --disable-bauth --disable-dauth --disable-curl $

Re: [libmicrohttpd] libmicrohttpd 0.9.48 released

2015-12-19 Thread silvioprog
Noce job! :-) I did many tests in this version and it is very stable on Windows. The 0.9.48 should replace the 0.9.46.tar.gz and 0.9.17-w32.zip on MHD home page. On Sat, Dec 19, 2015 at 6:10 AM, Evgeny Grin wrote: > Dear all, > > I'm glad to announce the release of libmicrohttpd 0.9.48. > > GN

Re: [libmicrohttpd] Fwd: Maintaining libmicrohttpd

2015-12-21 Thread silvioprog
He worked a lot to make the new versions of MHD compatible and stable on Windows, and his code is very good, I'm using it in production and it is working like a charm. Now that Evgeny is co-maintainer of MHD, can I help him to update the packages on MHD home page? It would be nice because I'm goin

Re: [libmicrohttpd] Fwd: Maintaining libmicrohttpd

2015-12-22 Thread silvioprog
Very nice news, and thanks for the time dedicated to MHD project! :-) On Mon, Dec 21, 2015 at 3:56 PM, Evgeny Grin wrote: > > 21.12.2015, 21:25, "silvioprog" : > > He worked a lot to make the new versions of MHD compatible and stable on > Windows, and his code is v

Re: [libmicrohttpd] Fwd: Maintaining libmicrohttpd

2015-12-22 Thread silvioprog
Sorry for my ignorance, but, what is Gopher module? On Mon, Dec 21, 2015 at 9:15 PM, Hein-Pieter van Braam wrote: > On Mon, 2015-12-21 at 21:37 +0300, Evgeny Grin wrote: > > Hurray! I'm co-maintainer now! > > Hopefully we will not drive the project in opposite directions. :) > > Just kidding. :)

Re: [libmicrohttpd] Fwd: Maintaining libmicrohttpd

2015-12-22 Thread silvioprog
Very nice! (y) I believe that the new Ev's scripts will automate the release process, if so it will be very good, because we always will have the same version for *unix and Windows at home page. :-) On Mon, Dec 21, 2015 at 5:47 PM, Christian Grothoff wrote: > On 12/21/2015 07:24 PM, si

Re: [libmicrohttpd] Fwd: Maintaining libmicrohttpd

2015-12-23 Thread silvioprog
I like it! :-D I did not know that this protocol existed. :o Thx for share it. On Tue, Dec 22, 2015 at 2:42 PM, Hein-Pieter van Braam wrote: > Hi, > > Sorry, it was just a silly joke. Gopher is an (arguably) obsolete > protocol that predates the web and HTTP. > > https://en.wikipedia.org/wiki/G

Re: [libmicrohttpd] Fwd: Maintaining libmicrohttpd

2015-12-23 Thread silvioprog
On Wed, Dec 23, 2015 at 5:10 AM, Andreas Wehrmann wrote: > On 12/22/2015 06:42 PM, Hein-Pieter van Braam wrote: > >> Hi, >> >> Sorry, it was just a silly joke. Gopher is an (arguably) obsolete >> protocol that predates the web and HTTP. >> >> https://en.wikipedia.org/wiki/Gopher_%28protocol%29 >>

[libmicrohttpd] MHD_get_reason_phrase_for miss() _MHD_EXTERN

2016-01-11 Thread silvioprog
Hello, Why the `MHD_get_reason_phrase_for()` function isn't declared using _MHD_EXTERN? It seems a very useful function. :-) Thank you! -- Silvio Clécio

Re: [libmicrohttpd] MHD_get_reason_phrase_for miss() _MHD_EXTERN

2016-01-12 Thread silvioprog
Thank you! :-) On Tue, Jan 12, 2016 at 1:21 PM, Evgeny Grin wrote: [...] > > Fixed in SVN r36811. -- Silvio Clécio

[libmicrohttpd] Broken image in the MHD manual

2016-01-18 Thread silvioprog
Hello, The broken picture: https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#fig_003aperformance Thanks! :-) -- Silvio Clécio

Re: [libmicrohttpd] Broken image in the MHD manual

2016-01-19 Thread silvioprog
Thank you! :-) On Tue, Jan 19, 2016 at 5:58 AM, Christian Grothoff wrote: > Fixed. Thanks for reporting. -Christian > > On 01/19/2016 01:00 AM, silvioprog wrote: > > Hello, > > > > The broken picture: > > > > > https://www.gnu.org/softwa

[libmicrohttpd] How to disable the connection keep-alive header?

2016-01-21 Thread silvioprog
Hello, Sometimes we need to disable the keep-alive header. For example, see this headers sent from the Express framework: X-Powered-By: Express Date: Fri, 22 Jan 2016 02:59:01 GMT Content-Type: text/html; charset=utf-8 Content-Length: 53 ETag: W/"35-gbcWXekTybZhSQkHA12aAA" Wel, just for a test,

Re: [libmicrohttpd] How to disable the connection keep-alive header?

2016-01-22 Thread silvioprog
set "Connection: close". > > On 01/22/2016 04:17 AM, silvioprog wrote: > > Hello, > > > > Sometimes we need to disable the keep-alive header. For example, see this > > headers sent from the Express framework: > > > > X-Powered-By: Express

Re: [libmicrohttpd] How to disable the connection keep-alive header?

2016-01-22 Thread silvioprog
On Fri, Jan 22, 2016 at 1:35 PM, Evgeny Grin wrote: > > On 22.01.2016 17:31, silvioprog wrote: > > Hm... I saw it, but it should be disabled without force this close > > header. I'll debug it and try to send a patch... > HTTP standard forbids response without &qu

Re: [libmicrohttpd] How to disable the connection keep-alive header?

2016-01-25 Thread silvioprog
Grin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On 22.01.2016 20:27, silvioprog wrote: > > Is there some link where I can get it? I need this one to document it in > > my framework that uses MHD. > https://tools.ietf.org/html/rfc7230#page-52 > - --- begi

[libmicrohttpd] 0004137: [PATCH] Cosmetic fix to timeout example - GNUnet Bugtracking

2016-01-27 Thread silvioprog
https://gnunet.org/bugs/view.php?id=4137 -- Shared from my Android

[libmicrohttpd] How can I decode the form-data fields with MHD_http_unescape() function?

2016-02-15 Thread silvioprog
Hello, I have following form-data: Content-Type: multipart-form-data id=10&name=Silvio+Cl%C3%A9cio ... some uploads here ... But when I decode it with MHD_http_unescape() function: ..., char *key, ... MHD_http_unescape(key); I got: Silvio+Clécio But I need the full unescaped value, that is "

Re: [libmicrohttpd] How can I decode the form-data fields with MHD_http_unescape() function?

2016-02-16 Thread silvioprog
On Tue, Feb 16, 2016 at 9:29 AM, Evgeny Grin wrote: > There is a conflict between standards. > HTML states that "+" must be decoded to space in url-encoding. > https://www.w3.org/TR/html/forms.html#url-encoded-form-data > RFC 3986 doesn't assume any special treatment of "+". > https://tools.ietf.

[libmicrohttpd] What is the `transfer_encoding` param in the MHD_PostDataIterator callback?

2016-02-20 Thread silvioprog
Hello listers, The MHD_PostDataIterator documentation says: *transfer_encoding* * encoding of the data, NULL if not known;* Awesome. But, I don't know how to use this feature, so I have two questions: . do I need to send some header in the x-www-form-urlencoded POST? . do I need to send some h

[libmicrohttpd] How do I check if the request was done from HTTP or HTTPS?

2016-02-23 Thread silvioprog
Hello listers, Sometimes, we need to check if the client does a request from HTTP or HTTPS protocol, and then take a decision. In nginx I use it to redirect all requests from HTTP URL to the HTTPS URL. I took a look how NodeJS does it, because it has the `protocol` property on its request object:

Re: [libmicrohttpd] How do I check if the request was done from HTTP or HTTPS?

2016-02-23 Thread silvioprog
Eureka! It seems that starting two daemons is better way instead of MHD_CONNECTION_INFO_GNUTLS_SESSION: just redirect all requests from daemon:80 to daemon:443. Great idea CG, thanks very much! :-) On Tue, Feb 23, 2016 at 10:31 PM, Christian Grothoff wrote: > Hi! > > Well, to run MHD with both

[libmicrohttpd] Can I get the entire MHD log without depends on C function like sprintf()?

2016-02-27 Thread silvioprog
Hello, I'm using MHD in a small application written in Delphi (Pascal), and it is working like a charm. Today I needed to get all generated log from MHD, however it seems that it depends on functions like *sprintf(), but the Pascal Format() function is a little bit different from C, because the Pa

Re: [libmicrohttpd] Can I get the entire MHD log without depends on C function like sprintf()?

2016-02-27 Thread silvioprog
Complementing: It would be very useful to the ones that need to get the entire log without depend on C format functions or providing some built-in MHD format function. On Sat, Feb 27, 2016 at 5:14 PM, silvioprog wrote: > Hello, > > I'm using MHD in a small application written in

Re: [libmicrohttpd] Can I get the entire MHD log without depends on C function like sprintf()?

2016-02-29 Thread silvioprog
t Delphi can safe 4 lines of code because it's not C-compatible is not a good trade-off in my mind. Still, I think sharing this here is useful, as others may have the same question in the future, and I actually think your solution is great. Happy hacking! Christian On 02/27/2016 09:14 PM,

[libmicrohttpd] Some questions about the example "digest_auth_example.c"

2016-03-02 Thread silvioprog
Hello, I'm making some high level classes for handling a12n with MHD, but I have some questions about the example digest_auth_example.c , that implements the digest a12n and I'm unsing this one to understand how MHD handles a

Re: [libmicrohttpd] Can I get the entire MHD log without depends on C function like sprintf()?

2016-03-02 Thread silvioprog
Hello Martin, I meant "when you pass a va_list to a function, it is assumed that it will be 'consumed' by the called function". So, as I use two functions, the params is freed by the first one. Consider the following MHD log error: 'Failed to bind to port 8080: Address already in use'#10 // #10

Re: [libmicrohttpd] Some questions about the example "digest_auth_example.c"

2016-03-03 Thread silvioprog
Very good explanations. I'll comment some of them and make a new question at the bottom. On Thu, Mar 3, 2016 at 5:06 AM, Christian Grothoff wrote: > No, see: > > > http://security.stackexchange.com/questions/24425/what-is-the-opaque-field-in-http-digest-access-authentication-used-for If I unde

Re: [libmicrohttpd] Some questions about the example "digest_auth_example.c"

2016-03-03 Thread silvioprog
After this new explanation finally I fully understood. Thanks a lot Christian! :-) On Thu, Mar 3, 2016 at 11:33 AM, Christian Grothoff wrote: > On 03/03/2016 02:00 PM, silvioprog wrote: > > Very good explanations. I'll comment some of them and make a new > > question at th

[libmicrohttpd] Is the "digest_auth_example.c" example working on Firefox?

2016-03-07 Thread silvioprog
Hello, Can anybody check if the "digest_auth_example.c " example is still working on Firefox? It works fine with Chrome and Internet Explorer, but when I try using Firefox, it shows "Access denied", and when I refresh the pag

Re: [libmicrohttpd] Is the "digest_auth_example.c" example working on Firefox?

2016-03-08 Thread silvioprog
I found the problem. It seems that I can't use letters with accents, for example, if you change the "realm" to: ... const char *realm = "Informe usuário e senha"; // a brazilian message like "Inform user and password" in English ... The problem happens, and only with Firefox (and probably Ice

[libmicrohttpd] Doubt about digest auth algorithm

2016-03-10 Thread silvioprog
Hello listers, First, thanks for the rich auth demos available in the MHD, it was very useful for understand how the popular auths works. I have a small question about the digest auth: how to check if the user password is correctly? I have an example (in pseudo code) to check if my logic is corre

Re: [libmicrohttpd] Doubt about digest auth algorithm

2016-03-13 Thread silvioprog
Hello Christian, So my logic is correct. I'll document my code using this informations. Thank you very much! :-) On Sun, Mar 13, 2016 at 10:36 AM, Christian Grothoff wrote: > Dear Silvio, > > Yes, the difference is that with basic_auth, MHD "returns" you the > password the user provided. This

Re: [libmicrohttpd] Is the "digest_auth_example.c" example working on Firefox?

2016-03-13 Thread silvioprog
Hello Christian, It seems related to the FF, I'm using ANSI strings. A quote from StackOverflow: [1] > >- Opera uses UTF-8; > > >- IE uses the system's default codepage (which you have no way of >knowing, other than it's never UTF-8), and silently mangles characters that >don't f

[libmicrohttpd] [VIDEO] Introduction to GNU libmicrohttpd

2016-03-13 Thread silvioprog
Hello, Awesome video with an introduction to GNU libmicrohttpd: https://youtu.be/jmkYbftonLk Enjoy! :-D Speaker: Christian Grothoff Language: English Time: ~27 min -- Silvio Clécio

Re: [libmicrohttpd] [VIDEO] Introduction to GNU libmicrohttpd

2016-03-14 Thread silvioprog
Awesome! :-) On Mon, Mar 14, 2016 at 4:22 AM, Christian Grothoff wrote: > Same talk, without advertising and without using the Google: > > https://entropia.de/GPN13:Introduction_to_GNU_libmicrohttpd -- Silvio Clécio

<    1   2   3   >