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

2016-03-03 Thread Christian Grothoff
On 03/03/2016 02:00 PM, silvioprog wrote: > 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 <mailto:groth...@gnunet.org>> wrote: > > No, see: > >

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

2016-03-08 Thread Christian Grothoff
Works fine for me with Iceweasel 44.0-1 from Debian. -Christian On 03/07/2016 07:16 PM, silvioprog wrote: > Hello, > > Can anybody check if the "digest_auth_example.c > " > example is still working on Firefox? It works fine

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

2016-03-13 Thread Christian Grothoff
em happens, and only with Firefox (and probably Iceweasel). > > On Tue, Mar 8, 2016 at 5:14 PM, Christian Grothoff <mailto:groth...@gnunet.org>> wrote: > > Works fine for me with Iceweasel 44.0-1 from Debian. > > -Christian > > > -- > Silvio Clécio signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] Doubt about digest auth algorithm

2016-03-13 Thread Christian Grothoff
Dear Silvio, Yes, the difference is that with basic_auth, MHD "returns" you the password the user provided. This is not possible with digest auth. Here, you must provide the password and call MHD_digest_auth_check(). So with digest auth, you first use MHD_digest_auth_get_username() to find out th

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

2016-03-14 Thread Christian Grothoff
joy! :-D > > Speaker: Christian Grothoff > Language: English > Time: ~27 min > signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] How to avoid the "Internal application error, closing connection" message when AHC = NO?

2016-03-14 Thread Christian Grothoff
You could filter those in your custom logger, which you can set using MHD_OPTION_EXTERNAL_LOGGER. -Christian On 03/14/2016 02:11 PM, silvioprog wrote: > Hello, > > Sometimes, an application needs to refuse the client connection, something > like this: > > static int ahc_echo(void *cls, ...) { >

Re: [libmicrohttpd] [PATCH] epoll: add locking around eready DLL

2016-03-15 Thread Christian Grothoff
Hi Dan, I'm a tad confused. You do realize that each _thread_ has its own "struct MHD_Daemon" with its own "eready_head" and "eready_tail", and that thus there isn't really the possibility of a race as long as each thread sticks to its list? This was done deliberately to avoid having to do any lo

Re: [libmicrohttpd] [PATCH] epoll: add locking around eready DLL

2016-03-15 Thread Christian Grothoff
Well, that's debatable, as it's really cheap and might aid with diagnostics. I can see this one go either way, IIRC I left it in as it is now thinking that preserving the invariant was a good thing. But as I said, I have no particularly strong feelings here. On 03/15/2016 06:32 PM, Dan Dedrick wro

Re: [libmicrohttpd] [PATCH] epoll: add locking around eready DLL

2016-03-15 Thread Christian Grothoff
0.9.34 is rather ancient (see ChangeLog for list of issues resolved since...). So you might just want to update first and then see if you can still reproduce anything... On 03/15/2016 08:17 PM, Dan Dedrick wrote: > I actually did see a SIGSEGV in EDLL_insert() on "(head)->prevE = > element;". tai

Re: [libmicrohttpd] [PATCH] epoll: add locking around eready DLL

2016-03-15 Thread Christian Grothoff
I just checked, and indeed there was (still) this inconsistency in the code where with MHD_USE_THREAD_PER_CONNECTION we were (on some code paths) manipulating the shared eready DLLs. As we don't need it, the answer is not to introduce locking, but to just not use the data structure. I've now fixe

Re: [libmicrohttpd] [PATCH] daemon: don't access thread if pthread_create failed

2016-03-15 Thread Christian Grothoff
Committed as suggested as SVN 36932. -Christian On 03/15/2016 08:45 PM, Dan Dedrick wrote: > If pthread_create fails for some reason we need to not access the > thread pointer as it will not be valid. Without this check a failed > return code from pthread_create would cause a SIGSEGV to occur. >

Re: [libmicrohttpd] Idris bindings for GNU libmicrohttpd

2016-03-19 Thread Christian Grothoff
Hi Colin, Thanks for letting me know. I'll add a link to it from the MHD web site. If anyone else has a (public, free software) project with bindings for MHD, please also let the list know. Happy hacking! Christian On 03/19/2016 01:09 PM, Colin Adams wrote: > Hello Christian, > > Just to let y

Re: [libmicrohttpd] Demo "largepost.c" with a file about 6GB

2016-03-28 Thread Christian Grothoff
Hi Silvio, I just tried a 4699722540 byte file with both Firefox and Chrome on GNU/Linux using 'largepost.c', and it worked without a problem. If you've compiled your own custom application, make sure you've enabled large file support for your disk IO. That said, I've not (recently?) tested this

Re: [libmicrohttpd] Unix sockets support

2016-04-05 Thread Christian Grothoff
Why do you think it is not supported? AFAIK it works fine with all the things people would usually want: * you can use a UNIX socket instead of a TCP listen socket using MHD_OPTION_LISTEN_SOCKET, or * if you established the connection already and have a UNIX stream socket instead of an accept()-

Re: [libmicrohttpd] No response to client.

2016-04-07 Thread Christian Grothoff
On 04/07/2016 03:53 PM, Martin Bonner wrote: > I have an embedded webserver written with libmicrohttpd. A client is posting > messages to it with custom crafted TCP send/recv calls (so not libcurl or > anything trusted like that). In real life, these messages are sent every > half a second. E

[libmicrohttpd] libmicrohttpd 0.9.49 released

2016-04-09 Thread Christian Grothoff
Dear all, I'm happy to announce the release of libmicrohttpd 0.9.49. GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application. GNU libmicrohttpd is fully HTTP 1.1 compliant and supports IPv6. Finally, GNU libmicrohttpd is fast, p

Re: [libmicrohttpd] single-threaded daemon, multiple pending requests, responses batched

2016-04-10 Thread Christian Grothoff
On 04/10/2016 10:11 PM, Frank Ch. Eigler wrote: > Hi - > > One of the programs I work on uses libmicrohttpd to serve a web > protocol. It uses vanilla single-threaded select mode. > > Some of the requests require timetaking operations on the order of > seconds. A web browser might make multiple

Re: [libmicrohttpd] single-threaded daemon, multiple pending requests, responses batched

2016-04-10 Thread Christian Grothoff
Sorry, attached a bad diff the first time, here's the real one ;-). -Christian Index: daemon.c === --- daemon.c (revision 37013) +++ daemon.c (working copy) @@ -2914,6 +2914,8 @@ /* process events for connections */ while (NULL

Re: [libmicrohttpd] libmicrohttpd 0.9.49 released

2016-04-12 Thread Christian Grothoff
icrohttpd/.libs/ -lmicrohttpd > LD_LIBRARY_PATH=/tmp/libmicrohttpd-0.9.49/src/microhttpd/.libs/ > ./testmhd > wget -O /dev/null 127.0.0.1:8080 > Best wishes, > Markus > Am Samstag, den 09.04.2016, 16:39 +0200 schrieb Christian G

Re: [libmicrohttpd] single-threaded daemon, multiple pending requests, responses batched

2016-04-13 Thread Christian Grothoff
On 04/13/2016 05:51 PM, Frank Ch. Eigler wrote: > > Christian Grothoff wrote: > >> [...] >> Are you, by chance, doing significant blocking operations within the >> single-threaded event loop? (Outch...). I understand that then our extra >> run through select()

Re: [libmicrohttpd] suspend/resume patch

2016-04-14 Thread Christian Grothoff
Hi Flavio, Well, if we do bother to detect this, my preference would be not to ignore the bad behavior, but to literally call the panic function (i.e. abort()). Suspending an already suspended connection or resuming one that isn't already resumed is indicative of a serious logic error in the appl

Re: [libmicrohttpd] MHD_ContentReaderCallback and Byte serving

2016-04-16 Thread Christian Grothoff
Hi! What you do is you need to (1) manually add the header to tell the browser that you support range requests, and (2) request the "Range" header from MHD, and parse it to get the range yourself. Then you generate a response that covers the range (that's what the "at_offset" API is for). Maybe w

Re: [libmicrohttpd] Select Replaced By Busy Loop When Accept Fails

2016-05-16 Thread Christian Grothoff
Hi! I've fixed this in SVN 37175. The MHD now detects that it is at some system/process resource limit (EMFILE, ENFILE, ENOBUF), even if that is lower than whatever was configured for the MHD_OPTION_CONNECTION_LIMIT. In this case, MHD stops accepting connections until at least one connection is

Re: [libmicrohttpd] suspend/resume patch

2016-05-17 Thread Christian Grothoff
Done as of SVN 37180. I'll try to get to the rest of your e-mail later. -Christian On 05/17/2016 09:53 AM, José Bollo wrote: > I'd like to recall you that I'd like to see this change integrated. 0xE29FC3CC.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signatu

Re: [libmicrohttpd] suspend/resume patch

2016-05-29 Thread Christian Grothoff
On 05/17/2016 09:53 AM, José Bollo wrote: > Le mercredi 20 avril 2016 à 20:41 +0300, Evgeny Grin a écrit : > Please could check again whether the following patch that avoid to > close the connection when upgrade is called is valid or not. > > diff -Naur a/src/microhttpd/connection.c b/src/microhtt

Re: [libmicrohttpd] Status 304 and insistent Content-Length header

2016-06-01 Thread Christian Grothoff
You're right, my reading of the spec is that we SHOULD NOT transmit content-length in these cases. Should be fixed in SVN 37227. (Note that if you explicitly add the header, we do send it, we just no longer add it in if it is missing in these cases.) Happy hacking! Christian On 06/01/2016 09:29

[libmicrohttpd] libmicrohttpd 0.9.50 released

2016-06-02 Thread Christian Grothoff
Dear all, We're happy to announce the release of libmicrohttpd 0.9.50. GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application. GNU libmicrohttpd is fully HTTP 1.1 compliant and supports IPv6. Finally, GNU libmicrohttpd is fast,

Re: [libmicrohttpd] libmicrohttpd 0.9.50 released

2016-06-02 Thread Christian Grothoff
9:15:warning: implicit declaration of function ‘MHD_DLOG’ > [-Wimplicit-function-declaration] > MHD_DLOG (daemon, > > Thanks a lot! > Markus > > > > On Don, 2016-06-02 at 10:10 +0200, Christian Grothoff wrote: >> Dear all, >> >> We're h

Re: [libmicrohttpd] libmicrohttpd 0.9.50 released

2016-06-04 Thread Christian Grothoff
On 06/04/2016 01:50 PM, silvioprog wrote: > Lol I haven't seen, thanks for remind me. I'm going to download it. > > So, what language was used to build MHD home page? I can send a code that > prints the latest released packages on it. It's a static HTML page. -Christian signature.asc Descripti

Re: [libmicrohttpd] libmicrohttpd 0.9.50 released

2016-06-04 Thread Christian Grothoff
No, loading some insanity like jQuery is not worth it. In fact, the page should work without JavaScript. -Christian On 06/04/2016 07:41 PM, silvioprog wrote: > Awesome. Can we use something like jQuery on there? signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] MHD in "worker processes" mode

2016-06-10 Thread Christian Grothoff
On 06/10/2016 02:04 AM, silvioprog wrote: > Hello, > > Please take a look at this question and the first answer: > > http://askubuntu.com/questions/399431/how-many-nginx-processes-should-there-be > > It raise a question: can I use the worker processes approach with MHD? > If I understood, it nee

Re: [libmicrohttpd] MHD in "worker processes" mode

2016-06-10 Thread Christian Grothoff
On 06/10/2016 09:20 PM, Junker, Gregory wrote: > On Fri, 2016-06-10 at 13:37 +0200, Christian Grothoff wrote: >> On 06/10/2016 02:04 AM, silvioprog wrote: >>> >>> Hello, >>> >>> Please take a look at this question and the first answer: >>> &g

Re: [libmicrohttpd] libmicrohttpd 0.9.50 released

2016-06-11 Thread Christian Grothoff
Should be fixed now. No need for code, a symlink does the trick ;-). -Christian On 06/04/2016 09:23 PM, silvioprog wrote: > No JS, no some language at server... no idea how to solve it. :-( > > On Sat, Jun 4, 2016 at 3:06 PM, Christian Grothoff > wrote: > >> No, loadi

Re: [libmicrohttpd] libmicrohttpd 0.9.50 released

2016-06-12 Thread Christian Grothoff
On 06/12/2016 08:52 PM, silvioprog wrote: > Great idea! > > The tar.gz version returns "Not Found". Should be fixed soon (mirrors need to sync). > Does Apache from MHD server recognize .sh scrips as CGI? The gnu.org HTTP should not run such scripts, that is not a good idea. signature.asc Des

Re: [libmicrohttpd] regarding http webserver using libmicrohttpd

2016-06-29 Thread Christian Grothoff
On 06/29/2016 07:56 AM, Suman.Patro-TRN wrote: > Hello, > >I would like to use libmicrohttpd for making an http > webserver for real time data serving. > > *Use case* is as follows: I would like to compare and contrast > websockets and traditional http for real time data monitoring.

Re: [libmicrohttpd] "FIXME"?

2016-07-08 Thread Christian Grothoff
Fixed in SVN 37512, thanks for letting me know. -Christian On 07/08/2016 09:19 PM, silvioprog wrote: > Hello masters. :-) > > I found some "FIXME" entries at MHD tutorial and I'm not sure if it was a > typo. Look for > "Setting the cookie header" at: > > https://www.gnu.org/software/libmicrohttp

Re: [libmicrohttpd] MHD_AccessHandlerCallback won't be called again if *upload_data_size is set to non-zero.

2016-07-16 Thread Christian Grothoff
Hi Nicholas, I've looked at the code, and I don't think this is a bug in MHD. Basically, the issue is that you're telling MHD that you cannot immediately process all POST data (by partially handling the data). But MHD never does busy waiting, and we have now no way of telling when your application

Re: [libmicrohttpd] suspend/resume patch

2016-08-04 Thread Christian Grothoff
Hi Jose, You've not been forgotten, I'm thinking about it and trying to find the time to really do the right thing here... Best, Christian signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] Query on using openssl with microhttpd

2016-08-05 Thread Christian Grothoff
Not at this time. -Christian On 08/05/2016 04:49 PM, Geetha Shanmugam wrote: > Hi, > Is there a way we can use openssl library (instead of gnutls) with > microhttpd? > > Thanks, > Geetha > signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] Creating instances in the option MHD_OPTION_URI_LOG_CALLBACK

2016-08-10 Thread Christian Grothoff
On 08/08/2016 02:26 AM, silvioprog wrote: > Anyway, I have some doubts. When I set a routine to the > MHD_OPTION_URI_LOG_CALLBACK option, is this one always called once time for > each request? If so, that's OK, otherwise, which one can I use instead? The log is guaranteed to be called once and on

Re: [libmicrohttpd] MHD_OPTION_CONNECTION_LIMIT=1 issue

2016-08-11 Thread Christian Grothoff
Hi Yong, MHD would clean up the previous connection, but in your case that probably simply doesn't happen in time for the 2nd request to be accepted. Setting the limit to 1 is _very_ low in almost all cases, and if you do so, you should expect connections to fail unless you really only have 1 clie

Re: [libmicrohttpd] Question about the new `mhd_threads.h` header

2016-08-11 Thread Christian Grothoff
They do not relate to providing an HTTP server, and they thus should remain an internal API. We should have the flexibility of changing them in any way we see fit without breaking ABI compatibility. So I don't think we should export those. But if an app wants them, making a copy of the code should

Re: [libmicrohttpd] Doubt regarding to MHD_UpgradeAction

2016-08-13 Thread Christian Grothoff
You should not enable it, as it has not yet been implemented and is likely to change before it is stable. -Christian On 08/13/2016 05:30 PM, silvioprog wrote: > Hello, > > I'm upgrading my Pascal header to the MHD version 0.9.50, however, I found > the following comment in the MHD_UpgradeAction e

Re: [libmicrohttpd] MHD and HTTP2

2016-08-19 Thread Christian Grothoff
Hi Silvio, Not in the forseeable future. -Christian On 08/19/2016 07:08 PM, silvioprog wrote: > Hello masters, > > Is there any plan to make MHD supporting HTTP2? > > Thank you! > > -- > Silvio Clécio > signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] Query on async response using microhttpd

2016-08-22 Thread Christian Grothoff
I somehow doubt you got an error from MHD_create_response_from_buffer(), that's, eh, very rare (pretty much always indicates out of memory). I speculate that you meant you got an error from MHD_queue_response(), which is what will happen if you try to do 'resume' and 'queue' within the same functi

Re: [libmicrohttpd] Query on async response using microhttpd

2016-08-22 Thread Christian Grothoff
On 08/22/2016 09:36 PM, Geetha Shanmugam wrote: > 1. Is there a way to find out if MHD_resume_connection returned an error? > (i am using MHD version 0.9.50 and resume and suspend returns void) There is nothing to check here. > 2. MHD_USE_SELECT_INTERNALLY can handle multiple simultaneous connect

Re: [libmicrohttpd] [SSL-Example] load_file(), terminate c-string with a null-character?

2016-08-24 Thread Christian Grothoff
Hi! I think this is the one that was already fixed in SVN 36923 on Feb 29th 2016. However, we failed to update the Web site version since, so I should fix that... -Christian On 08/24/2016 02:31 PM, Weber, Peter (Wilken Software Engineering GmbH) wrote: > Hello! > > I've used the example code f

[libmicrohttpd] libmicrohttpd 0.9.51 released

2016-08-27 Thread Christian Grothoff
Dear all, I'm happy to announce the release of libmicrohttpd 0.9.47. GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application. GNU libmicrohttpd is fully HTTP 1.1 compliant and supports IPv6. Finally, GNU libmicrohttpd is fast,

Re: [libmicrohttpd] libmicrohttpd 0.9.51 released

2016-08-27 Thread Christian Grothoff
Somebody requested it years ago to assist with debugging (at least that's the only use I can think of). I suspect Evgeny added the disable option to assist those that really want to minimize MHD's code size. On 08/27/2016 07:54 PM, Anthony G. Basile wrote: > I'm confused by this new configure opt

Re: [libmicrohttpd] suspend/resume patch

2016-08-30 Thread Christian Grothoff
ios where this fixes something, it's a bit hard for me to reverse-engineer the motivations for the patch. Thanks & Happy hacking! Christian On 08/29/2016 11:06 PM, José Bollo wrote: > Le jeudi 04 août 2016 à 21:29 +0200, Christian Grothoff a écrit : >> Hi Jose, >> >> Yo

Re: [libmicrohttpd] Suspending/resuming not working with external select

2016-09-04 Thread Christian Grothoff
Dear Johannes, You need to run "MHD_run()" between resuming and asking for the FD set. It was not very well documented, so I've fixed the documentation in SVN 37877. You also didn't FD_ZERO your fdsets, but that's minor. I've attached your code with my changes, so that it works. Happy hacking!

[libmicrohttpd] Connection: Upgrade / WebSockets

2016-09-04 Thread Christian Grothoff
Dear all, I've just completed adding support for "Connection: Upgrade" to libmicrohttpd. With this addition, it should be possible to support WebSockets, upgrade to TLS and all kinds of other protocol switches (via HTTP response code 101). To use the new functionality, the application basically

Re: [libmicrohttpd] Suspending/resuming not working with external select

2016-09-05 Thread Christian Grothoff
ty. The reason is that the function is called in MHD_epoll() which > is not called without IO activity. I think the API could be improved > there if it is not to difficult to implement. > > Again, thank you for your help. > Johannes > > > Am 04.09.2016 um 17:53 schrieb Chr

Re: [libmicrohttpd] Connection: Upgrade / WebSockets

2016-09-07 Thread Christian Grothoff
o. > > Thank you! > > On Sun, Sep 4, 2016 at 1:14 PM, Christian Grothoff > wrote: > >> Dear all, >> >> I've just completed adding support for "Connection: Upgrade" to >> libmicrohttpd. With this addition, it should be possible to supp

Re: [libmicrohttpd] Compressed response object.

2016-09-09 Thread Christian Grothoff
Dear Geetha, Yes, you can totally send compressed objects, just MHD will not do the compression for you: Your application has to implement the compression and give MHD the compressed data. You may also have to explicitly set content-encoding/content-type headers so that the client recognizes the c

Re: [libmicrohttpd] Was the Upgrade feature based in the obsolete rfc2616?

2016-09-16 Thread Christian Grothoff
That's because RFC 2616 describes the mechanism concisely and for the first time. However, what is implemented should, to the best of my knowledge, be fully compatible with the 723x-RFCs as well. On 09/15/2016 06:06 PM, silvioprog wrote: > Hello, > > I'm not sure but it seems that rfc 2616 was d

Re: [libmicrohttpd] MHD_create_response_from_callback() not called on POST

2016-09-27 Thread Christian Grothoff
Hi Leonard, I suspect you're queuing the response at a time where MHD disallows it, and then don't check the return value so you don't see the error message. Anyway, if you want to study POST processing of JSON with MHD, we have a big implementation doing just that in the Taler codebase at https

[libmicrohttpd] Repository moved

2016-10-12 Thread Christian Grothoff
Dear all, I've just converted the official GNU libmicrohttpd repository from Subversion to Git. You can clone the repository using: $ git clone git://gnunet.org/libmicrohttpd # read-only or if you are a developer with write-access using: $ git clone g...@gnunet.org:libmicrohttpd If you think

[libmicrohttpd] libmicrohttpd 0.9.52 released

2016-10-17 Thread Christian Grothoff
Dear all, I'm happy to announce the release of libmicrohttpd 0.9.52. GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application. GNU libmicrohttpd is fully HTTP 1.1 compliant and supports IPv6. Finally, GNU libmicrohttpd is fast,

Re: [libmicrohttpd] libmicrohttpd 0.9.52 released

2016-10-17 Thread Christian Grothoff
> > You can download GNU libmicrohttpd from > > * ftp://ftp.gnu.org/gnu/libmicrohttpd/ and all GNU FTP mirrors. > * Our Subversion repository at https://gnunet.org/svn/libmicrohttpd/ Eh, actually we are now on Git, I forgot to update that line: $ git clone git://gnunet.org/libmicrohttpd The Su

Re: [libmicrohttpd] Clarification on receiving on one thread, replying on another

2016-10-24 Thread Christian Grothoff
On 10/24/2016 04:51 PM, Tom Cornell wrote: > Quick question, probably: Should I be able to send replies from a > different thread from the one that runs the access handler callback, > using internal select? (Using suspend/resume. Also this is 0.9.50, in > case that matters.) You may call resume fr

Re: [libmicrohttpd] Clarification on receiving on one thread, replying on another

2016-10-24 Thread Christian Grothoff
On 10/24/2016 10:13 PM, Tom Cornell wrote: > > Generating a response requires forwarding another request off to > a different web service, and then possibly waiting a while for that > service to respond to us, so we can respond to our client. I'm looking > at different ways to avoid tying up an M

Re: [libmicrohttpd] Clarification on receiving on one thread, replying on another

2016-10-25 Thread Christian Grothoff
On 10/25/2016 03:59 PM, Tom Cornell wrote: > Hmmm. Okay. I was already returning from the access handler without > queuing a response (since that was happening on another thread), > but I am not seeing this subsequent extra call to the access handler. > Is that because I am suspending the connec

Re: [libmicrohttpd] Clarification on receiving on one thread, replying on another

2016-10-25 Thread Christian Grothoff
On 10/25/2016 05:45 PM, Tom Cornell wrote: > On Tue, Oct 25, 2016 at 04:11:12PM +0200, Christian Grothoff wrote: >> On 10/25/2016 03:59 PM, Tom Cornell wrote: >>> I will rework the code along the lines you suggest. Thanks for >>> the quick reply! >> >> Ok,

Re: [libmicrohttpd] Clarification on receiving on one thread, replying on another

2016-10-25 Thread Christian Grothoff
On 10/25/2016 07:24 PM, José Bollo wrote: > This topic is very interesting. > > Is it the same issue when an external select/poll is used? If you use external select/poll, then you should still only queue a response from within the AccessHandlerCallback. The only major difference with external s

Re: [libmicrohttpd] libmicrohttpd 0.9.52 released

2016-11-04 Thread Christian Grothoff
Dear Abhay, I've added such an example in Git commit ca582a0633be1d06210ad5eefca753f8e87d6211 (src/examples/upgrade_example.c). Happy hacking! Christian On 10/18/2016 10:32 AM, Abhay Gupta wrote: > Hi , > > Can a example we added for the use of Websockets may be a echo type page > to show the

Re: [libmicrohttpd] libmicrohttpd MHD_start_daemon Illegal instruction: 4

2016-11-10 Thread Christian Grothoff
I doubt that without code, without stack trace and/or other information anyone will be able to help you. -Christian On 11/10/2016 04:28 PM, Thibault Beziers La Fosse wrote: > Hello, I have some difficulties to resolve a bug. > > I have an application programmed in c++ which works fine. However so

Re: [libmicrohttpd] Protocol upgrade

2016-11-13 Thread Christian Grothoff
On 11/13/2016 08:47 PM, Markus Doppelbauer wrote: > Hello, > > Is the "protocol upgrade" API finalized? Let's say I have no intention of changing it dramatically. > I can live with that, but this > way I need a second event loop. I would prefer an API where the MHD > event loop waits for websoc

Re: [libmicrohttpd] Protocol upgrade

2016-11-14 Thread Christian Grothoff
I would add that I personally would prefer to see such an implementation of WebSockets kept outside of libmicrohttpd.so proper. HTTP Upgrade/switching protocols is part of the HTTP core standard and thus must be provided by MHD. However, WebSockets is something that can and should be separate, as

Re: [libmicrohttpd] Out of band authentication with libmicrohttpd

2016-12-01 Thread Christian Grothoff
Dear Daniel, We just defined the status code (for completeness of the #defines), but never implemented its semantics. So you cannot actually use it with MHD. Happy hacking Christian On 12/01/2016 03:28 PM, Daniel Tweed, Mr wrote: > Dear Evgeny, > > My primary question is around the fact that

Re: [libmicrohttpd] Out of band authentication with libmicrohttpd

2016-12-02 Thread Christian Grothoff
It actually shouldn't be hard to add, we just never had anyone asking for it. I don't see how it would hurt to support it either. But I'll have to read the spec in detail to see what would need to be done (and I won't get to that this year.) On 12/01/2016 07:28 PM, Daniel Tweed, Mr wrote: > I'm s

Re: [libmicrohttpd] Out of band authentication with libmicrohttpd

2016-12-03 Thread Christian Grothoff
Hi Daniel, Could you try MHD with the attached patch to see if this works? (I've not tested it, but just wanted to quickly see it this could be done in a few lines). Happy hacking! Christian On 12/01/2016 07:28 PM, Daniel Tweed, Mr wrote: > I'm sorry if it's rude to ask, but have you ever seen

Re: [libmicrohttpd] Out of band authentication with libmicrohttpd

2016-12-03 Thread Christian Grothoff
Hi Daniel, Could you try MHD with the attached patch to see if this works? (I've not tested it, but just wanted to quickly see it this could be done in a few lines). Happy hacking! Christian On 12/01/2016 07:28 PM, Daniel Tweed, Mr wrote: > I'm sorry if it's rude to ask, but have you ever seen

Re: [libmicrohttpd] unable to respond before reading entire incoming payload

2016-12-12 Thread Christian Grothoff
On 12/12/2016 08:39 PM, Evgeny Grin wrote: > Hi, > >> I am provoking a request for 'Payload too large' for our MHD server, by >> using curl sending a short request (~25 bytes) but adding a Content-Len >> header of a lot more (2 megabytes). > > To clarify: you are not providing some large request

Re: [libmicrohttpd] Compile issue

2017-01-07 Thread Christian Grothoff
Should be fixed now, thanks for reporting! -Christian On 01/07/2017 11:47 AM, Markus Doppelbauer wrote: > Current git does not compile without "HAVE_MESSAGES": > This is the context in "daemon.c": > > > if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && >(MHD_NO != ret) )

Re: [libmicrohttpd] Broken link

2017-01-12 Thread Christian Grothoff
I'm sorry, but when I load the page there is no link to a 'compatibility report'. I'm also not aware of ever adding such a link. Maybe your system is infected and injects such links? On 01/11/2017 11:58 PM, Chris Hiszpanski wrote: > The 'compatibility report' link on > https://www.gnu.org/softwar

Re: [libmicrohttpd] Broken link

2017-01-12 Thread Christian Grothoff
Never mind, seems Evgeny was faster at removing it... -Christian On 01/12/2017 11:07 AM, Christian Grothoff wrote: > I'm sorry, but when I load the page there is no link to a 'compatibility > report'. I'm also not aware of ever adding such a link. Maybe your > system

Re: [libmicrohttpd] MHD_RESPMEM_PERSISTENT

2017-01-24 Thread Christian Grothoff
Miguel, I can only assume that your assertion that you are not modifying the buffer after creating the response object is not correct. My 2 cents Christian On 01/24/2017 05:22 PM, Miguel Sancho wrote: > Hi Silvio, thanks for answering, > >> Could you show what error and how the buffer was assi

Re: [libmicrohttpd] MHD_RESPMEM_PERSISTENT

2017-01-25 Thread Christian Grothoff
On 01/25/2017 05:01 AM, Mark Wagner wrote: > As far as I'm aware, there's no way to > know when the library is actually done with the response object. Well, after you call MHD_stop_daemon(), we're definitively done ;-). But yes, you are totally right in the rest of your analysis. > It may be sa

Re: [libmicrohttpd] Bench-marking issue

2017-01-28 Thread Christian Grothoff
Hi! I don't know why you used the rather castrated setup for MHD for benchmarking. First of all, for benchmarking you should only create the response object once (in main), and only destroy it once (in main), and re-use it across connections in your 'ahc_echo'. That might give you some cheap boo

Re: [libmicrohttpd] Typo?: MHD_SUPPRESS_DATE_NO_CLOCK and MHD_NO_FLAG

2017-01-29 Thread Christian Grothoff
Well, it was discussed (between Evgeny and me), and "USE_" together with "SUPPRESS" or "NO" made no sense linguistically, so we decided to not rename these flags, also to minimize disruptions. On 01/29/2017 10:35 PM, silvioprog wrote: > Hello masters, > > I've noticed all flags for `USE` scope wa

Re: [libmicrohttpd] Typo?: MHD_SUPPRESS_DATE_NO_CLOCK and MHD_NO_FLAG

2017-01-30 Thread Christian Grothoff
Hmm. This should not be the case, as we kept the old names around for now to ensure backwards-compatibility. Which flag gave you trouble? On 01/30/2017 07:36 PM, silvioprog wrote: > I had a problem in my project, it didn't compile it because a flag was > renamed, luckily I checked the GIT log and

Re: [libmicrohttpd] Typo?: MHD_SUPPRESS_DATE_NO_CLOCK and MHD_NO_FLAG

2017-01-31 Thread Christian Grothoff
On 01/31/2017 05:27 AM, silvioprog wrote: > On Mon, Jan 30, 2017 at 5:38 PM, Evgeny Grin > wrote: > > No. Those flags are not removed. Do you have problems with it? > > -- > Best Wishes, > Evgeny Grin > > > Yes, I do. My MHD version: 0.9.52. Problem

Re: [libmicrohttpd] Typo?: MHD_SUPPRESS_DATE_NO_CLOCK and MHD_NO_FLAG

2017-01-31 Thread Christian Grothoff
On 01/31/2017 05:59 PM, silvioprog wrote: > Complementing: > > $ cat /usr/local/include/microhttpd.h | grep 'MHD_VERSION' > #define MHD_VERSION 0x00095102 > > How to convert 0x00095102 version in human readable returning something > like 0.9.52? > You should not. That's not what this is meant f

Re: [libmicrohttpd] FreeBSD tests failing

2017-01-31 Thread Christian Grothoff
Hi Mate, Well, I knew that 'shutdown' behaves different on FreeBSD than on Linux, and at least some time ago we carefully avoided the use of the Linux-specific shutdown semantics on FreeBSD. Now, it seems that somehow we have a regression in that regards, at least with respect to the testcases (w

Re: [libmicrohttpd] FreeBSD tests failing

2017-01-31 Thread Christian Grothoff
;; openbsd*) On 02/01/2017 12:04 AM, Christian Grothoff wrote: > Hi Mate, > > Well, I knew that 'shutdown' behaves different on FreeBSD than on Linux, > and at least some time ago we carefully avoided the use of the > Linux-specific shutdown semantics on FreeBSD. Now, it se

Re: [libmicrohttpd] FreeBSD tests failing

2017-02-01 Thread Christian Grothoff
On 02/01/2017 09:03 AM, Evgeny Grin wrote: > Christian, > > I need to look deeper in this problem. > On my machine "shutdown listen" works on FreeBSD. Now that's interesting. It certainly doesn't work on our buildbot... > Or maybe we need to in integrate run-tests into configure for all systems,

Re: [libmicrohttpd] Trying to understand libmicrohttpd versioning

2017-02-13 Thread Christian Grothoff
Hi! I think what you're spotting is that I made a mistake in updating the library revision in the past, and failed to reset CURRENT (or bump AGE). We are at least 99.9%-compatible with .so.10 / 0.9.37, but there _may_ have been some minor reason to bump the .so-level, not entirely sure which of t

Re: [libmicrohttpd] Trying to understand libmicrohttpd versioning

2017-02-14 Thread Christian Grothoff
On 02/13/2017 07:32 PM, Tomas Heran wrote: > > E.g. if that would happen in 0.9.53, then things would be as follows: > > LIB_VERSION_CURRENT=53 > LIB_VERSION_REVISION=0 > LIB_VERSION_AGE=0 > > resulting in libmicrohttpd.so.53.0.0. > > Do I understand that correctly? Yes, seems correct. -Christ

Re: [libmicrohttpd] How to compile MHD for ARMv7?

2017-02-16 Thread Christian Grothoff
On 02/16/2017 07:48 AM, silvioprog wrote: > The attached patch fix the compilation. Maybe, but as written it will break compilation on other systems. I've deployed a new tsearch test based on gnulib's code in f154b0ef..82d65c48, which should actually achieve some reasonable level of portability.

Re: [libmicrohttpd] How to compile MHD for ARMv7?

2017-02-19 Thread Christian Grothoff
Done. On 02/19/2017 06:05 AM, silvioprog wrote: > Please apply this new patch and delete sent config.logs. :-) This patch fix > the problem after latest Grothoff's commit. (SHA 82d65c48) > > -- signature.asc Description: OpenPGP digital signature

Re: [libmicrohttpd] MHD can't find MO files

2017-02-24 Thread Christian Grothoff
n 02/24/2017 11:41 PM, silvioprog wrote: > P.S: Looking at mhd_options.h I found the following comment: > > /** > * Macro to make it easy to mark text for translation. Note that > * we do not actually call gettext() in MHD, but we do make it > * easy to create a ".po" file so that applications

Re: [libmicrohttpd] MHD can't find MO files

2017-02-24 Thread Christian Grothoff
On 02/25/2017 03:05 AM, silvioprog wrote: > > Anyway I'm curious, is there any special reason to MHD not to call > bindtextdomain() internally? 🤔 (it seems locale.h/libintl.h is present in > all SOs supported by MHD ...) Yes, to minimize runtime dependencies and maximize speed in the (common) cas

Re: [libmicrohttpd] [PATCH] add authors and copyright to the example `timeout.c`

2017-02-26 Thread Christian Grothoff
Actually, we must, according to the GNU maintainer guide (it was an oversight of not putting a header in the first place). But the patch didn't apply cleanly here, that's why I didn't yet do it... On 02/26/2017 09:44 PM, Evgeny Grin wrote: > Christian, > > It's up to you to change/add copyright

Re: [libmicrohttpd] Trunk: make distcheck fail

2017-02-27 Thread Christian Grothoff
No, you simply have some left-over files from something you did as 'root' (or some other UID) in your build directory. Just chown -R everything to your usual $USER and 'make distcheck' will work fine. On 02/26/2017 10:25 PM, silvioprog wrote: > I'm trying generate a new package from MHD trunk, ho

Re: [libmicrohttpd] Websockets

2017-03-07 Thread Christian Grothoff
We've not yet updated the tutorial, but maybe the test case helps? https://gnunet.org/git/libmicrohttpd.git/tree/src/microhttpd/test_upgrade.c On 03/03/2017 08:37 PM, John Duncan wrote: > I was reading somewhere that websockets have been added to the library? If > so, is there any example code

Re: [libmicrohttpd] largepost.c reset connection when file already exists

2017-03-11 Thread Christian Grothoff
Hi Vitaliy, The example indeed had an issue in that it was trying to queue a response during the upload (instead of at the end). Fixed in 15a2570f..740a46dd Happy hacking! Christian On 03/11/2017 05:09 AM, Vitaliy T wrote: > Hi, > > I have started using libmicrohttpd and I am experienced a pr

Re: [libmicrohttpd] largepost.c reset connection when file already exists

2017-03-13 Thread Christian Grothoff
On 03/11/2017 03:39 PM, Vitaliy T wrote: > Still there is an issue with re-open a file. Patch applied below to avoid it. Thanks, Fixed as suggested in 1855c73c..59268ccf. > Offtopic: > Are there plans to "say" libmicrohttpd to "clear" network buffers when > something goes wrong and we are ready t

Re: [libmicrohttpd] Websockets

2017-03-13 Thread Christian Grothoff
On 03/13/2017 09:39 PM, John Duncan wrote: > Quick question. I noticed when I built the library, it didn't move > mhd_sockets.h into the includes. That file contains all the > MHD_send_/MHD_recv_ macros used in the websockets unit test. Am I supposed > to re-implement the functions/macros found

Re: [libmicrohttpd] Patch for gothub links on the home page

2024-11-06 Thread Christian Grothoff
Thanks, fixed! -Christian On 11/6/24 11:32, Thérèse Godefroy wrote: Hello, The libmicrohttpd home page includes many links to an instance of gothub that has been broken for several weeks. Here is a patch that switches them to another instance, which seems more reliable: https://gothub.projectse

<    3   4   5   6   7   8   9   >