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

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] 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

[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
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] 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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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

[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

[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\

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

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
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
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

[libmicrohttpd] Double regarding suspended connection and pthread_exit

2020-03-16 Thread silvioprog
Hi. I have a routine which suspends a MHD connection and calls the following functions when it starts: 1. MHD_suspend_connection() 2. pthread_create() 3. pthread_detach() and the following when it finishes: 1. MHD_resume_connection() 2. *some callback()* 3. pthread_exit() but the server may be

Re: [libmicrohttpd] Double regarding suspended connection and pthread_exit

2020-03-16 Thread silvioprog
Oh, sent accidentally by Ctrl+Enter with wrong subject. I meant: "Doubt regarding suspended connection and pthread_exit". On Mon, Mar 16, 2020 at 4:00 PM silvioprog wrote: > Hi. > > I have a routine which suspends a MHD connection and calls the following > functions

Re: [libmicrohttpd] running in main thread

2019-12-04 Thread silvioprog
On Wed, Dec 4, 2019 at 9:38 AM Evgeny Grin wrote: > You can also use very portable and universal solution: > > mhd = MHD_start_daemon(MHD_USE_AUTO, > > while(1) > { > fd_set rs; > fd_set ws; > Thanks for sharing! Is there any version of this code using epoll()? If so, I could contribute

Re: [libmicrohttpd] running in main thread

2019-12-02 Thread silvioprog
On Mon, Dec 2, 2019 at 2:22 PM silvioprog wrote: > In Rust and Pascal we generally call some locking function to stay > "running" application, in those cases, it would be nice to call something > like this: > > static int my_awesome_callback(void *cls) { > re

Re: [libmicrohttpd] running in main thread

2019-12-02 Thread silvioprog
Dear friends. On Mon, Dec 2, 2019 at 12:49 PM José Bollo wrote: > No in fact the question is serious. There is no simple way to let run > MHD on the main thread. It requires implementing an external > poll/select loop. > > Can you provide an integrated main that serves and doesn't return until >

Re: [libmicrohttpd] How to get the client IP as IPv4 in dual stack mode?

2019-11-28 Thread silvioprog
len)) memcpy(buf, buf + len, strlen(buf + len) + 1); return 0; } if (!inet_ntop(AF_INET, &(((struct sockaddr_in *) sa)->sin_addr), buf, size)) return errno; return 0; } Thank you! On Thu, Nov 28, 2019 at 5:02 PM Christian Grothoff wrote: > Hi silv

[libmicrohttpd] How to get the client IP as IPv4 in dual stack mode?

2019-11-27 Thread silvioprog
Hi. I have a function which checks if the sa_family is AF_INET or AF_INET6 and formats the client address as IPv4 (e.g. 127.0.0.1) or IPv6 (e.g. ::1) into a string. However, when I enable the dual stack in MHD, it always returns AF_INET6 in sa_family even when passing -4 as parameter in curl. I'm

Re: [libmicrohttpd] From LGPL 3.0 to LGPL 2.1?

2019-05-17 Thread silvioprog
I'm linking GnuTLS into my library. I have a doubt. Should any library which links GnuTLS be lisenced under LGPL 2.1 too? On Thu, May 16, 2019 at 8:23 AM Evgeny Grin wrote: > > 16.05.2019 0:28, Christian Grothoff wrote: > > On 5/15/19 1:37 AM, silvioprog wrote: &

Re: [libmicrohttpd] From LGPL 3.0 to LGPL 2.1?

2019-05-17 Thread silvioprog
Thanks for clarifying me! (y) On Wed, May 15, 2019 at 6:28 PM Christian Grothoff wrote: > On 5/15/19 1:37 AM, silvioprog wrote: > > Hello friends. > > > > After updating my git, I found the following commit log: > > > > /"Updated README and COPYING/ >

[libmicrohttpd] From LGPL 3.0 to LGPL 2.1?

2019-05-14 Thread silvioprog
Hello friends. After updating my git, I found the following commit log: *"Updated README and COPYING* *Note: library code is licensed under LGPLv2.1+ or eCOS terms/* *Come testsuite programs are licensed under GPLv3 terms."* Could you explain the main reasons? (Any advantages/disadvantages?) I

Re: [libmicrohttpd] Small fix in examples/http_chunked_compression.c

2019-04-30 Thread silvioprog
Hey Tim, it was applied. Thank you! :-) ( I've got a problem in my SSH key so I sent it to be applied by -CG, also added you to the contributors list :-) ) On Sun, Apr 28, 2019 at 3:28 PM silvioprog wrote: > Hello Tim. > > Thanks for fixing, I'm going to apply it. :-) &g

Re: [libmicrohttpd] Small fix in examples/http_chunked_compression.c

2019-04-28 Thread silvioprog
Hello Tim. Thanks for fixing, I'm going to apply it. :-) cheers On Sun, Apr 28, 2019 at 2:57 PM Tim Rühsen wrote: > Random find, the fread() error check needed a cast to work. > > Regards, Tim > > -- Silvio Clécio

Re: [libmicrohttpd] clang formatting discussion via [gnunet-developers]

2019-04-18 Thread silvioprog
Hello dudes, IMHO it would be nice to apply this file at MHD repository. As Martin commented on his e-mail below, many text editors provides integration with clang-format. I've used other CLang's stuff too, and one of my favorites is the CLang-Tidy . :-)

Re: [libmicrohttpd] Idea for a good design to use external select + suspend/resume + pthread

2019-03-16 Thread silvioprog
On Sun, Mar 17, 2019 at 2:28 AM silvioprog wrote: > ... It is a good practice ... > I meant "Is it a good practice ...". -- Silvio Clécio

[libmicrohttpd] Idea for a good design to use external select + suspend/resume + pthread

2019-03-16 Thread silvioprog
Hello everyone. I've tried to use an external select, the suspend/resume feature and a detached thread for some specific (slow) requests. The main idea around this, is: the common requests (database CRUDs, html/js/css sending etc.) are processed in the main loop within main thread (application), b

Re: [libmicrohttpd] tiny websocket above LMHD

2019-02-13 Thread silvioprog
Done! :-) On Tue, Feb 12, 2019 at 5:33 AM José Bollo wrote: > On Sun, 10 Feb 2019 19:45:07 -0300 > silvioprog wrote: > > > Hello José, thanks for answering. > > > > Sorry for resend, I don't know why the Gmail client sent it to your > > particular e-

Re: [libmicrohttpd] tiny websocket above LMHD

2019-02-10 Thread silvioprog
silvioprog wrote: > Hello José, thanks for answering. > > Sorry for resend, I don't know why the Gmail client sent it to your > particular e-mail. 🤔 > > So, I have a question. Could I send a feature-request at lmhd-ws/issues > <https://gitlab.com/jobol/lmhd-ws/issues>? I

Re: [libmicrohttpd] tiny websocket above LMHD

2019-02-10 Thread silvioprog
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 > silvioprog wrote: > > > Hello again José, > > Hi Silvio, > > > I tried the li

Re: [libmicrohttpd] MHD cannot write the entire chunked deflate data (deflate/chunked)

2019-02-10 Thread silvioprog
On Sun, Feb 10, 2019 at 7:08 PM Christian Grothoff wrote: > Sure, except for one thing: your clean up is not clean: on the "error:" > path, you do not "free(holder)", and on some of the "return MHD_NO" > paths you leak the entire response object. > > If you fix those minor nitpicks, this should m

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.63 released

2019-02-10 Thread silvioprog
Great news! \o/ Thank to all for the effort to release this new version, I've tested it on Windows and its build now works like a charm. best, On Sun, Feb 10, 2019 at 1:24 PM Christian Grothoff wrote: > Dear all, > > I'm glad to announce the release of GNU libmicrohttpd 0.9.63. > > GNU libmicr

Re: [libmicrohttpd] MHD cannot write the entire chunked deflate data (deflate/chunked)

2019-02-10 Thread silvioprog
loads the first 8k if you switch the header > to say 'gzip', and then bails. > > The correct zlib API you must use to do the compression this way are the > deflateInit(), deflate() and deflateEnd() calls. Between them, you must > udpate the z_stream structure, in particular

[libmicrohttpd] MHD cannot write the entire chunked deflate data (deflate/chunked)

2019-02-08 Thread silvioprog
Hello everyone, I've tried to compress a chunked data using ZLib & MHD, but the connection is closed while the data are transferred. Using the curl tool as client, it reports "curl: (23) Failed writing data" when we try to get a large file (about 100 kB). The attached MHD example uses the files "R

Re: [libmicrohttpd] [Windows] Build fails on MinGW-w64 (0.9.62)

2019-02-06 Thread silvioprog
Just to confirm: it compiled like a charm from trunk! :-) On Fri, Jan 4, 2019 at 7:42 PM silvioprog wrote: > Thanks for answering dude! :-) > > I'm going to test it ... 🏃 > > On Fri, Jan 4, 2019 at 5:56 PM Evgeny Grin wrote: > >> Hi, >> >&

Re: [libmicrohttpd] tiny websocket above LMHD

2019-02-03 Thread silvioprog
t aren't present on Windows. I've tried to solve it, but it is a little bit hard to be solved, and IIUC, the library would use IOCP on Windows, but I'm not familiar with that. :-/ Anyway, it can be used as base to develop a cross-platform WS solution to be used with MHD. Thank you!

Re: [libmicrohttpd] tiny websocket above LMHD

2019-02-02 Thread silvioprog
Hello José, first, thanks for this awesome work! I took a look at the sources and it seems very clean. I'll test it on Windows. I saw you did the client too, so it will be very helpful for who those want to study WS. But, I have two questions: is it very difficult to do a minimal WS example to di

Re: [libmicrohttpd] websocket example

2019-02-02 Thread silvioprog
Hello Nicolas, I took a look at your code and it is very interesting. Maybe it could help us to create a minimal WS example to be distributed in the MHD examples. Also, I'll reuse it as base to create a very tiny layer to distribute in a library I'm maintaining. All your/José's codes will help me

Re: [libmicrohttpd] websocket example

2019-02-02 Thread silvioprog
Hello José, I couldn't test it yet, but it is in my whishlist. Thanks again for sharing it! :-) On Wed, Jan 30, 2019 at 4:17 PM José Bollo wrote: > On Tue, 29 Jan 2019 16:16:59 +0100 > Moritz Warning wrote: > > > Hi, > > > > can someone point me to an example of using websockets with > > libmi

Re: [libmicrohttpd] websocket example

2019-02-02 Thread silvioprog
s a modified version of libmicrohttpd. > Then there is also lib/libwebsockets/, which seems to be an additional lib. > > On 1/29/19 6:38 PM, silvioprog wrote: > > Hi Moritz, > > > > I have interesting on it too (issued at: > > https://gnunet.org/bugs/view.php?id=5501). Som

Re: [libmicrohttpd] websocket example

2019-01-30 Thread silvioprog
Hello José, could we copy this example to the MHD examples? (this code was referenced in #5501 ) 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 > > h

Re: [libmicrohttpd] websocket example

2019-01-29 Thread silvioprog
Hi Moritz, I have interesting on it too (issued at: https://gnunet.org/bugs/view.php?id=5501). Some days ago I found an example which can be used as a start point to develop a small example: https://github.com/giovanni-liboni/libmicrohttpd-ws I don't tested it yet, but the implementation seems v

Re: [libmicrohttpd] Failed to send data in request for `/post/'.

2019-01-29 Thread silvioprog
The same error occurs if using MHD_USE_ERROR_LOG instead of MHD_USE_DEBUG. On Tue, Jan 29, 2019 at 4:07 AM silvioprog wrote: > Hello, > > I've noticed this message in some ajax requests. To reproduce the error, > just compile and run the attached example and hit some clicks in

Re: [libmicrohttpd] Failed to send data in request for `/post/'.

2019-01-28 Thread silvioprog
I meant "- get the error in the stdout.". Sorry for noising. (damn Gmail from Android hehe -.-' ) On Tue, Jan 29, 2019, 04:26 silvioprog Oops, I forgot two info. > > - get the error is showed in the stdout. > - the problem occurs in both Linux and Windows. > > Thank you! >

Re: [libmicrohttpd] Failed to send data in request for `/post/'.

2019-01-28 Thread silvioprog
Oops, I forgot two info. - get the error is showed in the stdout. - the problem occurs in both Linux and Windows. Thank you! On Tue, Jan 29, 2019, 04:07 silvioprog Hello, > > I've noticed this message in some ajax requests. To reproduce the error, > just compile and run the at

[libmicrohttpd] Failed to send data in request for `/post/'.

2019-01-28 Thread silvioprog
Hello, I've noticed this message in some ajax requests. To reproduce the error, just compile and run the attached example and hit some clicks in the link "Go to url (internal or external)...". I've temporally removed the flag MHD_USE_DEBUG to solve the problem, but I would like to understand why

[libmicrohttpd] ZLib & MHD_create_response_from_fd_at_offset64: compression on demand

2019-01-04 Thread silvioprog
Hello dudes, firstly, thanks Christian for indicating the MHD_fd* functions, I upgraded my library to use them! :-) Now I have a new challenge. I'm going to create two new examples for MHD (issue #4914), however, I have a question. Is there any chance to use zlib to compress data when creating a

Re: [libmicrohttpd] [Windows] Build fails on MinGW-w64 (0.9.62)

2019-01-04 Thread silvioprog
Thanks for answering dude! :-) I'm going to test it ... 🏃 On Fri, Jan 4, 2019 at 5:56 PM Evgeny Grin wrote: > Hi, > > It was fixed already in Git master by > 1616caa17764c878bc18c6344a0f7f60b2cb596c > > -- > Best Wishes, > Evgeny Grin > > 28.12.2018, 09:08,

[libmicrohttpd] [Windows] Build fails on MinGW-w64 (0.9.62)

2018-12-27 Thread silvioprog
Hello, I've tried to compile the latest stable version on MinGW-w64, but it raises the following error at build time (cut relevant parts only): wget --continue --content-disposition https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.62.tar.gz tar -zxvf libmicrohttpd-0.9.62.tar.gz cd libmicro

Re: [libmicrohttpd] libmicrohttpd 0.9.62 released

2018-12-08 Thread silvioprog
Great work! I'm using thread-pool and I confirm the problem too. Thanks JM for sending the patch solving it and Christian for the p.s note. Cheers On Sat, Dec 8, 2018 at 9:25 PM Christian Grothoff wrote: > Dear all, > > I'm glad to announce the release of GNU libmicrohttpd 0.9.62. > > GNU libm

Re: [libmicrohttpd] How to send Chunked messages

2018-12-06 Thread silvioprog
On Sat, Dec 1, 2018 at 11:19 AM silvioprog wrote: > and we could change MHD_FD_BLOCK_SIZE at build time to use a custom value > in such environments. > Done <https://gnunet.org/git/libmicrohttpd.git/diff/?id=b220303691d627ca3cfe0d949c6aa2257b722c60&id2=53674dcdfba0ade96b50672a

Re: [libmicrohttpd] Web Socket disconnect behaviour

2018-12-05 Thread silvioprog
Hi guys, What about to add a minimal websocket example? It really would be very useful. 🙂 Thank you! On Tue, Oct 30, 2018 at 1:02 PM silvioprog wrote: > I hope Christian/Evgeny and others agree with us too. :-) Websockets is a > very interesting subject! > > I took a

Re: [libmicrohttpd] [possible feature request?] Loading key/cert from file [gnutls_certificate_set_x509_key_file2()]

2018-12-05 Thread silvioprog
Hi Christian, I totally agree with you. After using the useful gnutls_load_file() for a long time I referenced it in the HTTPs examples in 53674dc . > p.s.: sorry for the delay, life's been very busy...

Re: [libmicrohttpd] Regarding IPV4/IPV6 support

2018-12-04 Thread silvioprog
Hi Santos. You can do it using the flag MHD_USE_DUAL_STACK: /** * Use a single socket for IPv4 and IPv6. */ MHD_USE_DUAL_STACK = MHD_USE_IPv6 | 2048, Cheers! On Tue, Dec 4, 2018 at 1:45 PM Santos Das wrote: > Hi, > > Can MHD listen on both IPv4 and IPv6 address at the same time? > >

Re: [libmicrohttpd] How to send Chunked messages

2018-12-01 Thread silvioprog
ov 30, 2018 at 7:18 PM Christian Grothoff wrote: > silvioprog: I don't understand why you'd use fopen() here instead of > just using the MHD_response_from_fd-style response generation. On > platforms where sendfile() is unavailable, MHD falls back to the usual > readi

Re: [libmicrohttpd] How to send Chunked messages

2018-11-29 Thread silvioprog
Hi Santos and Christian. Santos, the Christian's answer was complete and clarified me a lot too. ☺ Christian, it seems sendfile() is not available in mingw and in the Google's NDK (Android), but my library must work at least on Windows, Linux, Raspbian and Android, so I've used the fopen() in thi

Re: [libmicrohttpd] How to send Chunked messages

2018-11-28 Thread silvioprog
Hi Santos. I'm not sure if you want chunked transfer-encoding or something like byte serving (range requests). There is a small example showing how to send chunked data to the client here: https://gnunet.org/git/libmicrohttpd.git/tree/src/examples/chun

Re: [libmicrohttpd] Multipart Reading

2018-11-09 Thread silvioprog
Hi Santos, it is very easy to handle multi-part and/or form-data in MHD. Some time ago I sent this answer for a StackOverflow user: https://stackoverflow.com/a/32705436/3268398 . I handle uploads and/or payload (raw content) in the library (built under MHD) I'm maintaining. It allows to get any r

Re: [libmicrohttpd] next release

2018-11-09 Thread silvioprog
Awesome news! Thanks a lot for this work dudes. Cheers On Tue, Nov 6, 2018, 16:19 Christian Grothoff Dear all, > > I've now released libmicrohttpd 0.9.60 with the usual set of minor > bugfixes and feature enhancements: > > * gettext updated to 0.19.8 > * can use epoll() without listen socket no

Re: [libmicrohttpd] Web Socket disconnect behaviour

2018-10-30 Thread silvioprog
ents) in a small JS, but it would be nice to write a small client using libcurl too. On Tue, Oct 30, 2018 at 12:47 PM José Bollo wrote: > On Tue, 30 Oct 2018 12:30:46 -0300 > silvioprog wrote: > > > José, thanks a lot for sharing. > > Hi Silvio, > > > This example

Re: [libmicrohttpd] Web Socket disconnect behaviour

2018-10-30 Thread silvioprog
les folder? :-) It would be useful and a bootstrap for who wants to start in web sockets + MHD. Thank you for sharing! On Thu, Oct 11, 2018 at 4:22 AM José Bollo wrote: > On Mon, 8 Oct 2018 23:41:02 -0300 > silvioprog wrote: > > > Hi dudes. > > > > @Christian, just fo

Re: [libmicrohttpd] Web Socket disconnect behaviour

2018-10-08 Thread silvioprog
Hi dudes. @Christian, just for curiosity, is there any document or example showing MHD + WS? I can't provide it since I'm not familiar with WS, but it would be nice if someone could provide one for us. 😅 Thank you! On Wed, Sep 5, 2018 at 11:56 AM Christian Grothoff wrote: [...] > You need to i

Re: [libmicrohttpd] Question on Async support

2018-08-23 Thread silvioprog
Hello Christian, On Thu, Aug 23, 2018 at 8:58 PM Christian Grothoff wrote: [...] > Well, we have a list of alternatives on the MHD web site. But naturally > few people on this list would think they are as useful for _their_ > usecases. ;-) I would like to add my library to the page "Projects t

Re: [libmicrohttpd] Question on Async support

2018-08-23 Thread silvioprog
lso, take a look at daemon.c and connection.c files here <https://github.com/Karlson2k/libmicrohttpd/tree/master/src/microhttpd>. ☺ > Do you think libmicrohttpd is the best choice or is there any better > alternatives for me ? > I'm working a lot to release a new project for De

Re: [libmicrohttpd] Question on Async support

2018-08-23 Thread silvioprog
Hello Santos. Yes, you can use your own main loop. Please see: "*The fourth threading model (used when no specific flag is given), uses no threads. Instead, the main application must (periodically) request file descriptor sets from MHD, perform a select call and then call MHD_run. MHD_run will th

Re: [libmicrohttpd] Download page status: OFF

2018-08-21 Thread silvioprog
> Best Wishes, > Evgeny Grin > > > > 15.08.2018, 07:25, "silvioprog" : > > Hi MHD users. > > It seems the download page is offline. Could you test it?: > > https://ftp.gnu.org/gnu/libmicrohttpd/ > > the to the FTP: > > ftp://ftp.gnu.org/gnu/

[libmicrohttpd] Download page status: OFF

2018-08-14 Thread silvioprog
Hi MHD users. It seems the download page is offline. Could you test it?: https://ftp.gnu.org/gnu/libmicrohttpd/ the to the FTP: ftp://ftp.gnu.org/gnu/libmicrohttpd/ I've tried to access the page from two different browsers (and DNSs), but reached timeout in both. :-( Thank you! -- Silvio Cl

[libmicrohttpd] [possible feature request?] Loading key/cert from file [gnutls_certificate_set_x509_key_file2()]

2018-07-28 Thread silvioprog
Hello dudes. I tried to pass the key/cert files to the MHD library, however, it allows only passing via memory (using gnutls_certificate_set_x509_key_mem2()): MHD_OPTION_HTTPS_MEM_KEY, "private key content", MHD_OPTION_HTTPS_MEM_CERT, "certificate content" but it would be nice to use the Gnu

Re: [libmicrohttpd] libmicrohttpd is crashing during security test

2018-05-22 Thread silvioprog
Hello Purna, welcome to the list. :-) Could you try the MHD version 0.9.59? I'm not familiar with CentOS, but I think we can build latest MHD release easily from sources in that. On Tue, May 22, 2018 at 3:30 AM, Purna Chandra Jena wrote: > Hi, > > I am Purna from India. > I got this mailing lis

Re: [libmicrohttpd] POST data processing

2018-05-17 Thread silvioprog
in access content callback, however my iterate callback > is not called. > Please note that same code is working for text data (file upload or form > data). > > Thanks > Austin > > On Thu, May 17, 2018 at 6:56 PM, silvioprog wrote: > >> Hello Austin, >> >&g

Re: [libmicrohttpd] POST data processing

2018-05-17 Thread silvioprog
Hello Austin, As Christian explained, via "upload_data" you can receive any payload kind. I'm writting a library which maps MHD callbacks to "objects" and it needs to support the following features: 1. receive one or more files *on demand* (to receive large files about 5 GB+ without "frying" CPU/

Re: [libmicrohttpd] HTTP2 support for MHD

2018-03-30 Thread silvioprog
Hello Maru, awesome news! \o/ I'm very excited because of this announcement. Some time ago I locked at HTTP2 and tested it using Nginx, the test results were quite satisfactory. Now I'm outside company, but I'm going to test your project as soon as I return back. I'll send some feed of my tests f

Re: [libmicrohttpd] New project: microhttpd.h or microhttpd2.h?

2018-03-28 Thread silvioprog
). On Sun, Mar 25, 2018 at 6:33 AM, Christian Grothoff wrote: > On 03/25/2018 04:05 AM, silvioprog wrote: > > Hello. > > > > I'm going to create a new project from scratch that uses MHD as main > > HTTP library, so I'm free to choose a new API. However, I hav

[libmicrohttpd] New project: microhttpd.h or microhttpd2.h?

2018-03-24 Thread silvioprog
Hello. I'm going to create a new project from scratch that uses MHD as main HTTP library, so I'm free to choose a new API. However, I have some questions that may help me to choose between microhttpd.h and microhttpd2.h: * can I use the new API in production? (I'm following MHD changes, but I'm n

Re: [libmicrohttpd] MHD and PVS-Studio Analysis

2018-03-24 Thread silvioprog
may get an "index.html" containing all reported issues (like the link I showed above). Result for my environment / MHD copy: Total messages: 47 Filtered messages: 36 I would like to help to fix those issues. On Thu, Feb 1, 2018 at 6:11 AM, Christian Grothoff wrote: > Hi silvioprog

Re: [libmicrohttpd] How to proper fix error: "ISO C90 does not support ‘long long’"?

2018-03-24 Thread silvioprog
Oops... On Sat, Mar 24, 2018 at 1:11 PM, silvioprog wrote: > ... it seems GCC doesn't provide a specific option for this checking. > I meant "it seems -Wcomment/-Wcomments works only in 'C<=90'". -- Silvio Clécio

Re: [libmicrohttpd] How to proper fix error: "ISO C90 does not support ‘long long’"?

2018-03-24 Thread silvioprog
response to you trying > out compiler flags to try settings nobody has needed for 20+ years. > > On 03/24/2018 04:30 AM, silvioprog wrote: > > Christian, > > > > I'm using the following compilers: > > > > 1) clang version 5.0.1-svn325091-1~exp1 (branches/

Re: [libmicrohttpd] How to proper fix error: "ISO C90 does not support ‘long long’"?

2018-03-24 Thread silvioprog
le with C90*" to avoid "*//*" comments in my sources, but it seems GCC doesn't provide a specific option for this checking. :-/ On Sat, Mar 24, 2018 at 5:37 AM, Tim Rühsen wrote: > Hi Silvio, > > On 24.03.2018 04:30, silvioprog wrote: > > I'm using the follo

[libmicrohttpd] How to proper fix error: "ISO C90 does not support ‘long long’"?

2018-03-23 Thread silvioprog
lécio From 26ca79c3968eb1ce697af4ee6b07851bab4d0f3e Mon Sep 17 00:00:00 2001 From: silvioprog Date: Sat, 24 Mar 2018 00:15:40 -0300 Subject: [PATCH 1/1] Fix building in GCC. --- src/include/microhttpd.h | 4 1 file changed, 4 insertions(+) diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index cff084e..8d696e9 10

Re: [libmicrohttpd] Suspend/resume with single thread and external epoll not sending response

2018-03-11 Thread silvioprog
Hello dudes. It would be nice to attach this example (or Christian's explanation) in MHD's docs/examples. :-) Thank you! On Sun, Mar 11, 2018 at 2:11 PM, Christian Grothoff wrote: > Dear Bob, > > I've analyzed your code, and the issue is on your end: you simply didn't > set the timeout correct

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-24 Thread silvioprog
You're welcome buddy! :-) On Tue, Jan 23, 2018 at 3:23 PM, Marcel Rutten wrote: > Thanks Christian, > > I checked the error; "Invalid argument". > > > But I've not yet heard about a buggy accept4() implementation... > > This is a first, then :-) : > I blocked accept4() in favour of accept(), and

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-22 Thread silvioprog
# included in the NDK. ${log-lib} *"/home/silvioprog/AndroidStudioProjects/MHDServer/app/src/main/cpp/libmicrohttpd-0.9.58/src/microhttpd/.libs/libmicrohttpd.a"* ... it was intentional to show the directory with the generated static library, please change it on yo

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-21 Thread silvioprog
Hello Marcel, welcome to the list! I used MHD on ARM in a small HTTP server testing for Android: https://lists.gnu.org/archive/html/libmicrohttpd/2017-02/msg00014.html . This link contains an attached picture showing the results. I think I have the sources in my old machine. I don't know if my en

[libmicrohttpd] Ulfius >> Re: Fwd: [IMPORTANT] Ideas for Summer of Code 2018

2018-01-12 Thread silvioprog
Hi dudes. Just complementing. I think an awesome project should be presented in that event, the Ulfius project: HTTP Framework for REST Applications in C - https://babelouest.github.io/ ulfius/ IMHO, this is the best project using MHD and it is very easy to learn. Thank you! On Tue, Jan 9, 201

Re: [libmicrohttpd] How to send a binary payload (octet-stream)?

2018-01-05 Thread silvioprog
ed-stream.bin b9c65bf433a37289d848a1f833a6b311 content.bin b9c65bf433a37289d848a1f833a6b311 uploaded-stream.bin ps. I know MHD_create_post_processor(), but the test is just receiving a binary stream sent via octet-stream. On Fri, Jan 5, 2018 at 12:59 AM, silvioprog wrote: > Oh, I found a good explanation just after

Re: [libmicrohttpd] How to send a binary payload (octet-stream)?

2018-01-04 Thread silvioprog
demand. 🤔 I'm going to test it and back with some feedback ... On Fri, Jan 5, 2018 at 12:50 AM, silvioprog wrote: > Hi dudes! > > Consider the following file: > > http://brook.no-ip.org/download/content.bin > > request: > > # debugdump.txt just for de

[libmicrohttpd] How to send a binary payload (octet-stream)?

2018-01-04 Thread silvioprog
Hi dudes! Consider the following file: http://brook.no-ip.org/download/content.bin request: # debugdump.txt just for debuging $ url --header "Content-Type:application/octet-stream" --trace-ascii debugdump.txt --data-binary @content.bin http://localhost:9090 and example: #include #include #i

Re: [libmicrohttpd] Release 0.9.58, but configuration summary is 0.9.55

2017-12-08 Thread silvioprog
way to run configure. > I did not use AX_SUBDIRS_CONFIGURE. I could tell you that if you are using > tarball, then you do not need to run autoreconf or bootstrap as configure > is already generated. > > -- > Best Wishes, > Evgeny Grin > > 08.12.2017 19:46, silvioprog п

Re: [libmicrohttpd] Release 0.9.58, but configuration summary is 0.9.55

2017-12-08 Thread silvioprog
gnu/libmicrohttpd/libmicrohttpd-0. > 9.58.tar.gz and https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd- > latest.tar.gz with same result. > > -- > Best Wishes, > Evgeny Grin > > 08.12.2017 5:20, silvioprog пишет: > > Hi dudes. > > I've upgraded my MHD copy and af

[libmicrohttpd] Release 0.9.58, but configuration summary is 0.9.55

2017-12-07 Thread silvioprog
Hi dudes. I've upgraded my MHD copy and after configuring it I've got the following summary: === *configure: libmicrohttpd 0.9.55 Configuration Summary:* Cross-compiling: no Operating System: mingw32 Threading lib: w32 Use thread names: no Inter-thread comm: socketpair libcurl

  1   2   3   >