Re: [libmicrohttpd] Websockets

2017-03-17 Thread silvioprog
Hello John, I'm sure this example will be very useful for us! :-) Thank you! On Fri, Mar 17, 2017 at 9:59 PM, John Duncan wrote: > No problem. Thank you so much for your work on the library. It's great! > When I write some macros to do what's required I'll follow them up with a > mailing lis

Re: [libmicrohttpd] Websockets

2017-03-17 Thread silvioprog
Hehe :-D :-D On Fri, Mar 17, 2017 at 11:29 PM, John Duncan wrote: > Nevermind, was thinking of Silvio Cesare. He used to go by > silvioprogramming back in the 90s is why I asked. Sorry for the mixup! > > On Fri, Mar 17, 2017 at 3:05 PM, silvioprog wrote: > >> Hello John

[libmicrohttpd] MHD_quiesce_daemon() question

2017-03-25 Thread silvioprog
Hello masters, I found the following related message: https://lists.gnu.org/archive/html/libmicrohttpd/2014-09/msg00012.html I've used a similar logic, but with item X below, because I need to wait the client processing: 1) MHD_quiesce_daemon() *X) while (info.num_connections > 0) sleep(0.5s) #

Re: [libmicrohttpd] MHD_quiesce_daemon() question

2017-03-27 Thread silvioprog
called the MHD_stop_daemon() will be not called, probably raising some memory leak, but current I have no idea how it could be solved. Feel totally free to point improvements about this new version. :-) On Sun, Mar 26, 2017 at 5:36 PM, Evgeny Grin wrote: > On 26.03.2017 8:33, silvi

Re: [libmicrohttpd] MHD_quiesce_daemon() question

2017-03-27 Thread silvioprog
signal to the clients warning that the server will be finished in N seconds, so the clients could finish their processing immediately. On Mon, Mar 27, 2017 at 1:00 AM, Christian Grothoff wrote: > On 03/26/2017 10:36 PM, Evgeny Grin wrote: > > On 26.03.2017 8:33, silvioprog wrote: > &g

Re: [libmicrohttpd] MHD_quiesce_daemon() question

2017-03-28 Thread silvioprog
tempts is 10. */ _BF_LOG("Forced server shutdown.\n"); > break; } shutdown_attempts++; sleep(1); } } } else _BF_LOG("Server > quiesce failed.\n"); MHD_stop_daemon(srv->mhd); return true; } return > false; } > > -- > Best Wishes, > Evgeny Grin > > On 28.03

Re: [libmicrohttpd] MHD_quiesce_daemon() question

2017-03-28 Thread silvioprog
deas. :-) Anyway, if you see that *MHD_DAEMON_INFO_* could be an useful feature, I can try to send a patch implementing it, something like *MHD_DAEMON_INFO_**WAS_QUIESCED*. On Tue, Mar 28, 2017 at 12:51 PM, silvioprog wrote: > Dude, thanks for fixing it, I'm going to study the changes and a

Re: [libmicrohttpd] MHD_quiesce_daemon() question

2017-03-28 Thread silvioprog
(page), (void *) page, MHD_RESPMEM_PERSISTENT); ret = MHD_queue_response(con, MHD_HTTP_OK, response); MHD_destroy_response(response); return ret; } On Tue, Mar 28, 2017 at 1:32 PM, silvioprog wrote: > Done. The entire code is: https://pastebin.com/gNY2MwSY . I've used "curl > ht

[libmicrohttpd] MHD_create_post_processor: recommended buffer size for large posts

2017-03-30 Thread silvioprog
Hello dudes, Looking at MHD examples, it seems the recommended buffer size to specify on MHD_create_post_processor() for large uploads is 512: https://gnunet.org/svn/libmicrohttpd/doc/examples/largepost.c However, what means large for you? About 100 MB, 1 GB, 10 GB or greater?! I have a structu

Re: [libmicrohttpd] MHD_create_post_processor: recommended buffer size for large posts

2017-03-31 Thread silvioprog
should experiment to find out what is optimal for you. > > -- > Best Wishes, > Evgeny Grin > > On 31.03.2017 6:17, silvioprog wrote: > > Hello dudes, > > > > Looking at MHD examples, it seems the recommended buffer size to specify > > on MHD_create_post_proc

[libmicrohttpd] POST multipart/form-data + boundary = fail

2017-04-05 Thread silvioprog
Hello masters, I have a server that receives uploads (more than one file per request) and I've noticed in my logs that a specific client is sending the following content-type: Content-Type: multipart/form-data; boundary=---Embt-Boundary- -6B63449418F96CEB But MHD_post_process() can't process

Re: [libmicrohttpd] POST multipart/form-data + boundary = fail

2017-04-05 Thread silvioprog
Oops, sorry the noise, the problem is totally related to the client, that is sending a wrong content. On Wed, Apr 5, 2017 at 3:34 PM, silvioprog wrote: > Hello masters, > > I have a server that receives uploads (more than one file per request) and > I've noticed in my log

Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?

2017-05-03 Thread silvioprog
Hello Nicolas, I've looked something like this some time ago and the only way I've found was adding a new feature like this: https://lists.gnu.org/archive/html/libmicrohttpd/2017-03/msg00098.html (please notice the comments about a possible "MHD_DAEMON_INFO_WAS_QUIESCED") On Wed, May 3, 2017 at

Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?

2017-05-04 Thread silvioprog
On Thu, May 4, 2017 at 8:47 AM, Nicolas Mora wrote: [...] > Silvio's suggestion might work too, some signal like a > "MHD_DAEMON_INFO_WAS_QUIESCED" or, in my case "MHD_DAEMON_INFO_WAS_STOPPED". I'm going to send a patch to Evgeny ... -- Silvio Clécio

Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?

2017-05-04 Thread silvioprog
Done. So dudes, what do you think about this attached patch? On Thu, May 4, 2017 at 10:45 AM, silvioprog wrote: > On Thu, May 4, 2017 at 8:47 AM, Nicolas Mora > wrote: > [...] > >> Silvio's suggestion might work too, some signal like a >> "MHD_DAEMON

Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?

2017-05-05 Thread silvioprog
ation > can trivially track those itself, so these two are definitively just API > bloat. > > On 05/04/2017 03:59 PM, silvioprog wrote: > > Done. So dudes, what do you think about this attached patch? > > > -- Silvio Clécio

Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?

2017-05-05 Thread silvioprog
017 17:20, Christian Grothoff wrote: > > You forgot to update doc/libmicrohttpd.texi, otherwise looks OK even > > though I'm not convinced SHUTDOWN/QUESTCED are useful: an application > > can trivially track those itself, so these two are definitively just API > > bloat. > > > > On 05/04/2017 03:59 PM, silvioprog wrote: > >> Done. So dudes, what do you think about this attached patch? > >> > > -- Silvio Clécio

[libmicrohttpd] "updates to proposed API based on discussions with EG"

2017-08-21 Thread silvioprog
Hello duddes. :-) I'm very exited with this news and I'm following each new commit. I would be glad to read these discussions because I've learned a lot with them. Thanks! -- Silvio Clécio

[libmicrohttpd] [autotools] configuration summary for libcurl

2017-10-20 Thread silvioprog
Hello dudes. I've used the following configuration in a specific build: $ ./configure --enable-shared=no --enable-static=yes --enable-https=no --disable-doc --disable-examples --enable-asserts=no --disable-curl and I've got the following summary: libcurl (testing): no, many unit tests will no

Re: [libmicrohttpd] any plan to support http 2.0?

2017-10-25 Thread silvioprog
Hi Yuyong. An interface for HTTP2 was sent to the trunk and it is under development: https://github.com/Karlson2k/libmicrohttpd/blob/master/src/include/microhttpd2.h Please take a look at this topic too: http://lists.gnu.org/archive/html/libmicrohttpd/2017-08/msg00013.html Cheers. On Wed, Oct

Re: [libmicrohttpd] any plan to support http 2.0?

2017-10-26 Thread silvioprog
nally do not have plans to work on HTTP 2.0-support. > > Happy hacking! > > Christian > > On 10/26/2017 01:23 AM, silvioprog wrote: > > Hi Yuyong. > > > > An interface for HTTP2 was sent to the trunk and it is under development: > > > > https://g

Re: [libmicrohttpd] Please add support for RFC7616 (Digest auth with sha-2 instead of md5)

2017-10-29 Thread silvioprog
Hi Tim. The bugtracker link: https://gnunet.org/bugs/my_view_page.php Select "libmicrohttpd" in the project option. Cheers. On Sun, Oct 29, 2017 at 2:47 PM, Tim Rühsen wrote: > Hi Evgeny, > > on Savannah the buglist is empty. > > Where exactly can I find the bug/issue tracker ? > > Regards,

[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

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

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 п

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

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

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

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

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

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

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

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

[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

[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

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/

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

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

[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

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

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

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

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

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

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

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

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

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

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

[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

  1   2   3   >