Re: [libmicrohttpd] Fixing Gitlab CI

2024-06-14 Thread Evgeny Grin
Thanks, Tim! Have a nice weekend! -- Evgeny 14-Jun-2024 12:33 (UTC+0200), Tim Rühsen via libmicrohttpd wrote: Hey, I just pushed a branch `fix-gitlab-ci` that fixes the Gitlab CI for libmicrohttpd, see https://gitlab.com/libmicrohttpd/libmicrohttpd/-/pipelines/1332510732 Please feel free

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

2024-02-28 Thread Evgeny Grin
Hi Silvio, We do not have any official example for the MHD_run_wait() function. However, the idea is simple: if no network event happens the function returns after specified number of seconds, if anything happens on the network the function returns after processing all the relevant data. Git

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

2024-02-27 Thread Evgeny Grin
Hi Markus, Can you share a larger piece of code or give more details, like used mode (internal polling or external polling), polling function, other relevant information? -- Evgeny 27-Feb-2024 17:58 (UTC+0100), Markus Doppelbauer via libmicrohttpd wrote: What was your issue? How did you fix

[libmicrohttpd] GNU libmicrohttpd version 1.0.1 released

2024-02-23 Thread Evgeny Grin
Dear all, I'm glad to announce the release of GNU libmicrohttpd v1.0.1. Changes === This is a correction release. This release mainly fixes and improves builds with non-default configure parameters. Download You can download GNU libmicrohttpd from: * https://ftp.gnu.org/gnu/libm

[libmicrohttpd] GNU libmicrohttpd version 1.0.0 released

2024-02-01 Thread Evgeny Grin
are many other projects out there that provide that kind of functionality already. However, if you want to be able to serve HTTP requests from within your C or C++ application, check it out! GNU libmicrohttpd has been primarily developed by the GNU maintainers Evgeny Grin and Christian Grothoff

Re: [libmicrohttpd] [PATCH] Correct incorrect prototype of MHD_create_response_from_pipe in Info documentation

2024-01-05 Thread Evgeny Grin
Hi Aymeric, Thanks, corrected as suggested. -- Evgeny On 04/01/2024 05:51, Aymeric Agon-Rambosson wrote: Hello, I noticed that the Info documentation of function MHD_create_response_from_pipe is wrong. It takes only one parameter (the file descriptor of the pipe), and not two. Here is th

Re: [libmicrohttpd] Build failure with Link-Time Optimization

2023-12-27 Thread Evgeny Grin
- nothing unusual - -O3 -flto  - but maybe warnings are a bit overzealous (-Wuninitialized -Wstack-protector). I'll try producing a sample that reproduces this - and will use suggested workaround in the meantime. On Tue, 26 Dec 2023 at 17:21, Evgeny Grin <mailto:k...@yandex.ru>&g

Re: [libmicrohttpd] Build failure with Link-Time Optimization

2023-12-26 Thread Evgeny Grin
Hi Sergey, Are you using some special compiler or linker parameters? Some special compiler or linker versions? I regularly test MHD with LTO. I've retested the current git master with LTO and cannot reproduce. No errors, nor even warnings. If you check the code you will find that both menti

Re: [libmicrohttpd] Inquiry Regarding SSL/TLS Authentication with xPKI P12 Certificate in libmicrohttpd

2023-11-14 Thread Evgeny Grin
Hi Vysakh, The easiest way is converting your .p12/.pfx files in PKCS#12 format to standard .crt + .key (.pem). Just search the web for "convert PKCS#12 to crt and pem" or "extract public certificate and private key from PKCS#12". -- Evgeny On 13.11.2023 20:36, Vysakh A V wrote: Hi, We are

Re: [libmicrohttpd] How to specify content-length in a HEAD request

2023-11-06 Thread Evgeny Grin
I cannot give you precise date. It depends. But hopefully it will be release before the end of this year. If your badly need HEAD-only responses with arbitrary "Content-Length" header value right now, you can easily achieve it by creating response with MHD_create_response_from_callback() with

Re: [libmicrohttpd] Cannot set Content-Length in header

2023-11-06 Thread Evgeny Grin
Just to keep it in records. I found at least two applications trying to use the flag MHD_RF_INSANITY_HEADER_CONTENT_LENGTH to set the "Content-Length" header for HEAD responses. This is not a correct approach. Application must provide *correct* response for head request. *Correct* means (in

Re: [libmicrohttpd] How to specify content-length in a HEAD request

2023-11-05 Thread Evgeny Grin
Hi Rohit, On 05.11.2023 19:15, Rohit Kota wrote: Hello, We have a use case where content-length needs to be set in the response headers for a HEAD request. See for example:- https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html#API_HeadObject_Examples

Re: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)

2023-09-13 Thread Evgeny Grin
VS run-time warnings are nice. However, they warn even when explicit casting is used, which is not nice. Explicit cast means that data truncation is intentional. The suggested "fix" would not change the resulting binary *if compiler is smart enough*. MHD is very portable and can be built by ma

Re: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)

2023-09-11 Thread Evgeny Grin
Hi, Could you please try with current git master? -- Evgeny On 11.09.2023 16:19, Evgeny Grin wrote: Hi, Did you build it from the official tarbal archive? Have you compiled the example without any source code modification? What is your compiler, librarian and linker settings? Share your

Re: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)

2023-09-11 Thread Evgeny Grin
Hi, Did you build it from the official tarbal archive? Have you compiled the example without any source code modification? What is your compiler, librarian and linker settings? Share your "Command line" for the library and the application if you added a VS project. Can you share the content

Re: [libmicrohttpd] multipart/form-data Partial Write in Iterator

2023-08-09 Thread Evgeny Grin
Hi Gregory, Unfortunately currently MHD has no API to attach arbitrary FD to internal event loop. However, there are several ways how to handle it correctly. The easiest way is thread-per-connection mode (flag MHD_USE_THREAD_PER_CONNECTION). In this mode individual threads are created for ev

Re: [libmicrohttpd] 回复:Re: 回复:回复:Re: Help : Any HTTP Performance Benchmark Comparison for Microhttpd with Go HTTP Servers

2023-07-04 Thread Evgeny Grin
) Time per request:       3.767 [ms] (mean) Time per request:       0.038 [ms] (mean, across all concurrent requests) Transfer rate:          3085.38 [Kbytes/sec] received - 原始邮件 - *发件人:*Evgeny Grin *发送时间:*2023-07-04 00:40:33 *收件人:*libmicrohttpd development and user mailinglist *抄送

Re: [libmicrohttpd] 回复:回复:Re: Help : Any HTTP Performance Benchmark Comparison for Microhttpd with Go HTTP Servers

2023-07-03 Thread Evgeny Grin
wrote: Hi Evgeny: Could you please help to share the benchmark source file with me by email ? I want to run it on my system ASAP. Thanks, Forrest - 原始邮件 - *发件人:*lingweicai *发送时间:*2023-07-01 17:30:20 *收件人:*Evgeny Grin;libmicrohttpd development and user mailinglist *主 题:*

Re: [libmicrohttpd] Help : Any HTTP Performance Benchmark Comparison for Microhttpd with Go HTTP Servers

2023-06-29 Thread Evgeny Grin
Hi Forrest, The tool for performance replies is shaping, I have alpha version and made some test with suggested wrk. Here are the initial results: - $ wrk -c100 -d30s -t4 http://127.0.0.1:39683 Running 30s test @ http://127.0.0.1:39683 4 threads and 100

Re: [libmicrohttpd] 回复: Help : Any HTTP Performance Benchmark Comparison for Microhttpd with Go HTTP Servers

2023-06-29 Thread Evgeny Grin
Hi Forrest, I'm working on simple program that should demonstrate MHD performance. It expects that performance is measured on the client side. I'm not sure what's is not optimal with your current tests, however right now you can use '--enable-heavy-tests' configure parameter, which should enab

Re: [libmicrohttpd] Broken link

2023-06-23 Thread Evgeny Grin
I've updated it. Thank you, Aman. Christian, probably personal SHA-1-signed keys are problematic. You may try to update to ed25519 keys. -- Evgeny On 23.06.2023 10:41, Christian Grothoff wrote: Hi! Thanks for reporting! I'd love to fix this (actually, did fix it locally), but somehow Debia

Re: [libmicrohttpd] Any HTTP Performance Benchmark Comparison for Microhttpd with Go/Nodejs HTTP Servers

2023-06-20 Thread Evgeny Grin
Hi Forrest, The real benchmark-testing of web-servers is a tricky thing. You should consider: * real-live scenarios. Ideally it should be run over the real network, because the loopback traffic is handled differently by kernels. * very fast client. Ideally very dumb. Otherwise you may test your

[libmicrohttpd] GNU libmicrohttpd 0.9.77 released

2023-05-28 Thread Evgeny Grin
Dear all, I'm very glad to finally announce the new release of GNU libmicrohttpd library version 0.9.77. This is mostly a bugfix release. This version created by taking patches from the current development branch and back-porting them on top of version 0.9.76. The most notable changes are: so

Re: [libmicrohttpd] Feature request: ARM support for windows builds

2023-05-02 Thread Evgeny Grin
ately. autotools are much more flexible compared to CMake when you need to implement something tricky. And last but not least: GNU autotools is GNU project and suits best for GNU libmicrohttpd. -- Evgeny On 02.05.2023 12:50, Rosen Penev wrote: On May 2, 2023, at 12:22 PM, Evgeny Grin wrote:

Re: [libmicrohttpd] Feature request: ARM support for windows builds

2023-05-02 Thread Evgeny Grin
-compiled binary might have better compatibility with other VS-compiled binaries, however I'm not sure if this has any practical impact for MHD. -- Evgeny On 02.05.2023 11:16, Rosen Penev wrote: On May 2, 2023, at 10:26 AM, Evgeny Grin wrote: Hi Antonis, ARM and ARM64 support has been

Re: [libmicrohttpd] Feature request: ARM support for windows builds

2023-05-02 Thread Evgeny Grin
Hi Antonis, ARM and ARM64 support has been added for Visual Studio builds. Could you test current git master version? -- Evgeny On 26.04.2023 3:13, Antonis Matakos wrote: Evgeny, Thank you for the response. I created that patch with the intent to minimally "fix" the VCPKG port, so I'm sure t

Re: [libmicrohttpd] Feature request: ARM support for windows builds

2023-04-25 Thread Evgeny Grin
Hi Antonis, I'll update W32 files to properly support ARM and ARM64 targets. Your patches are not fully correct and works only for DLL and ARM64. Static ARM version may fail. -- Evgeny On 25.04.2023 5:57, Antonis Matakos wrote: Hi, We have been using the microhttpd library as one of our dep

Re: [libmicrohttpd] Avoid memory pool starvation for upgraded connectionss

2023-04-04 Thread Evgeny Grin
regards, Martin Hejnfelt On March 31, 2023 at 10:40:01 am +02:00, Evgeny Grin wrote: Hi Martin, The issue should be fixed in git master. $ git clone https://git.gnunet.org/libmicrohttpd.git <https://git.gnunet.org/libmicrohttpd.git> Could you check it? -- Wishes, Evgeny On 28.03.2023

Re: [libmicrohttpd] Avoid memory pool starvation for upgraded connectionss

2023-03-31 Thread Evgeny Grin
Hi Martin, The issue should be fixed in git master. $ git clone https://git.gnunet.org/libmicrohttpd.git Could you check it? -- Wishes, Evgeny On 28.03.2023 17:00, Evgeny Grin wrote: Hi Martin, Thank you for the report and the analysis. Indeed, 4-bytes communication is not efficient at

Re: [libmicrohttpd] Avoid memory pool starvation for upgraded connectionss

2023-03-28 Thread Evgeny Grin
Hi Martin, Thank you for the report and the analysis. Indeed, 4-bytes communication is not efficient at all. It will be fixed in git master in similar way as suggested. In adding. a log warning will be added to notify about such situations. I'll let you know when fix landed in the master bra

Re: [libmicrohttpd] MHD_USE_POLL trouble

2023-01-16 Thread Evgeny Grin
Hi kginbg, MHD_run() (and other MHD_run_*() functions) cannot be used with MHD started with internal threads. It is written in doxy description. If MHD is started with any kind of internal threads all the traffic on the set port is handled by MHD in MHD's thread. The caller thread does not nee

Re: [libmicrohttpd] MHD_USE_POLL trouble

2023-01-14 Thread Evgeny Grin
Hi kginbg, Have you tried to run of the MHD examples? Is result the same? I suspect something wrong with your callback functions. For example, if access handler callback function does not queue reply when request is received completely then this callback is called again immediately. If this i

Re: [libmicrohttpd] Response headers order change between 0.9.70 and 0.9.75

2023-01-11 Thread Evgeny Grin
the headers involves a huge number of changes (I have thousands of such tests). However I understand the changes in libmicrohttpd are for good, so it’s something that I should fix on my test regression sooner or later. Thanks! Best regards, -- Fermín *De:*Evgeny Grin *Enviado el:*

Re: [libmicrohttpd] Response headers order change between 0.9.70 and 0.9.75

2023-01-10 Thread Evgeny Grin
Hi Fermín, MHD internally has two types of response headers: user headers and automatic (mandatory) headers. For automatic headers MHD now follow RFC recommendation:"...it is good practice to send header fields that contain additional control data first, such asHost

Re: [libmicrohttpd] MHD_start_daemon returns NULL

2022-12-23 Thread Evgeny Grin
Hi Roel, Looks like your Linux kernel was compiled without eventfd support. Can you check your '.config' for 'CONFIG_EVENTFD'? The easiest way to build working MHD in such case is use '--enable-itc=pipe' configure parameter. It will prevent usage of eventfd functions even if eventfd support

Re: [libmicrohttpd] EPOLLRDHUP flag

2022-12-10 Thread Evgeny Grin
Hi Markus, Can you share more details about this? Currently MHD uses simplified connection close procedure and we have plans to reimplement it in a better way. Probably it is required to eliminate completely such long-waiting connections. If the issue is notable we can change TODO priorities.

Re: [libmicrohttpd] Change reason phrase

2022-12-05 Thread Evgeny Grin
From the new RFC 9112. https://www.rfc-editor.org/rfc/rfc9112.html#section-4 -- A client SHOULD ignore the reason-phrase content because it is not a reliable channel for information (it might be translated for a given locale, overwritten by int

Re: [libmicrohttpd] 0.9.76 anytime soon?

2022-10-31 Thread Evgeny Grin
Hi Sven, Apart from some new features and fixes since last version, MHD has got major overhauling of Digest Auth handling. Also the test-suite has got fixes and improvements. The rough list of to-do items before the next release: * finish the test-suite update (the final piece, fuzzing tests);

Re: [libmicrohttpd] Can't log client address

2022-08-25 Thread Evgeny Grin
Hi Klemens, Which MHD example has direct print of the "sa_data"? 'struct sockaddr' has the only accessible member, it is sa_family. You should check sa_family value to detect which protocol is used. Then, if it is IPv4, you must cast the pointer to 'struct sockaddr_in*' and operate members of

Re: [libmicrohttpd] macOS, gnu gcc, -no-cpp-precomp

2022-06-21 Thread Evgeny Grin
Hi Chris, Thanks for the report. Actually is not needed for a long time, but as MHD is tested by OS-supplied tool, it hasn't been noticed (clang still works with this flag). You can just delete the offending line in configure.ac and run './bootstrap'. This should rebuild 'configure', if you h

Re: [libmicrohttpd] Fix: Remove double adding of MHD_HTTP_HEADER_CONNECTION response header

2022-06-15 Thread Evgeny Grin
Hi Alexander, Applied as suggested. Also modified other similar examples with wrong API usage. Thanks for spotting this. -- All the best, Evgeny On 15.06.2022 13:45, Irion, Alexander wrote: Please, see the attached small fix: Remove double adding of MHD_HTTP_HEADER_CONNECTION response heade

Re: [libmicrohttpd] PATCH: Fix check for epoll mode and blocking socket

2022-05-18 Thread Evgeny Grin
Hi Kolja, Your patch is correct, applied as suggested. Can you share more information about your exotic platform? Do you need other modifications to run successfully MHD or it works just with this patch? Do you use autotools (configure) or you some custom MHD_config.h? It's interesting that s

Re: [libmicrohttpd] Digest authentication nonce uniqueness

2022-05-17 Thread Evgeny Grin
/*…*/ Best regards, Ahmet Kermen On 13 Jan 2022, at 20:43, Evgeny Grin <mailto:k...@yandex.ru>> wrote: Hi Ahmet, Thank for the report. I see some mistakes in our example (related to API complexity that should be improved soon), but these mistakes shouldn't break the example.

Re: [libmicrohttpd] Requesting peer's certificate

2022-04-14 Thread Evgeny Grin
Hello Russ, Currently there is no straightforward way to use client certificates with MHD. We may consider implementing this is feature. In the meantime you may provide your patches. -- Evgeny On 13.04.2022 23:18, Russ Riggs wrote: Good afternoon.  I'm working on a project that requires the

Re: [libmicrohttpd] How to bind to a specific IP address "out of the box"?

2022-04-13 Thread Evgeny Grin
Alternatively, you can pass bind address via MHD_OPTION_SOCK_ADDR option. So there are at least two ways how to handle it "out of the box". :) -- Evgeny On 13.04.2022 9:04, Christian Grothoff wrote: You can call socket/listen/bind _before_ MHD_start_daemon() and pass the ready-made fully-config

Re: [libmicrohttpd] Suggestion for /software/libmicrohttpd/

2022-04-10 Thread Evgeny Grin
Hello Markus, Thanks for the link. There are two issues preventing us from publishing the link to your software on our libmicrohttpd page: * Your product web page promote your software as "GPL-free" which defines GPL as something negative. [1] * We do not want to advertise GitHub on GNU site.

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.74 released

2022-03-07 Thread Evgeny Grin
Hi Markus, Thanks for the report. Unfortunatelly ASAN documentation is not very precise about manual poisoning/unpoisoning, however I think memory must be *unpoisoned* before freeing, just because memory is not poisoned when allocated. Should be fixed by https://git.gnunet.org/libmicrohttpd.

Re: [libmicrohttpd] chunked encoding & mjpeg stream

2022-03-01 Thread Evgeny Grin
oad even if it is transmitted with chunked encoding, even if chunk borders do not match "boundary" delimiters. Looks like current versions of Firefox and Chrome are trying to process "multipart" encapsulation as part of HTTP encapsulation which is not correct. -- Evge

Re: [libmicrohttpd] chunked encoding & mjpeg stream

2022-02-28 Thread Evgeny Grin
Hello, Looks like Chrome and Firefox just unable to process chunked encoding together with multipart/x-mixed-replace. Actually "multipart/x-mixed-replace" was never standardized for HTTP. We have other forms of "multipart/" defined for HTTP: * "multipart/form-data" for requests, see https://d

Re: [libmicrohttpd] Duplicate Content-Length headers set by MHD & application

2022-02-20 Thread Evgeny Grin
Hi Rob, Kodi currently using MHD API incorrectly. There is no need to use MHD_RF_INSANITY_HEADER_CONTENT_LENGTH unless you are testing HTTP client with incorrect HTTP response. The flag allow application to override MHD automatic value. There is no need to set `Content-Length` manually. MHD alw

Re: [libmicrohttpd] external event loop mode without using select?

2022-02-09 Thread Evgeny Grin
For any kind of cross-platform API for sockets FDs suggestions and/or patches are welcome. -- Evgney On 09.02.2022 10:39, Christian Grothoff wrote: If your platform supports it, you should grab the epoll FD from libmicrohttpd and only plug that single FD into your event loop, effectively casca

Re: [libmicrohttpd] MHD_OPTION_PER_IP_CONNECTION_LIMIT behaviour behind a reverse proxy

2022-02-08 Thread Evgeny Grin
Hi Kelson, On the one hand this is something that could be implemented in MHD. On the other hand, the value of such implementation is questionable. The per-ip limit was implemented to avoid getting of all (or too much of) servers resources for serving a single client (or just a few clients). W

Re: [libmicrohttpd] [PATCH] MHD_add_response_header: Check on passed nullptr

2022-01-28 Thread Evgeny Grin
Hello Alexander, On 27.01.2022 21:12, Alexander Dahl wrote: However this is not a such case. MHD never have guaranteed tolerating of NULL in this function. The data must be a valid C string. The NULL pointer is definitely not a valid C string. Well, I could not tell based on the API documentat

Re: [libmicrohttpd] [PATCH] MHD_add_response_header: Check on passed nullptr

2022-01-27 Thread Evgeny Grin
Hi Alexander, Thanks for the patch. Breaking API is always a bad idea, unless API itself is broken badly by design. However this is not a such case. MHD never have guaranteed tolerating of NULL in this function. The data must be a valid C string. The NULL pointer is definitely not a valid C st

Re: [libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere?

2022-01-25 Thread Evgeny Grin
On 24.01.2022 22:16, Gavin Henry wrote: Using graceful closure is one of the vital thing for correct implementation of any application. Understood. Of course you *must* call MHD_stop_daemon() as it stops MHD threads, free memory, closes sockets, and does other cleanups. Thanks. I understa

Re: [libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere?

2022-01-24 Thread Evgeny Grin
Hi Gavin, Using graceful closure is one of the vital thing for correct implementation of any application. Of course you *must* call MHD_stop_daemon() as it stops MHD threads, free memory, closes sockets, and does other cleanups. Not calling this function is like allocating memory without deal

Re: [libmicrohttpd] Digest Authentication algorithm field case sensitivity

2022-01-17 Thread Evgeny Grin
Values must match precisely what is specified by RFC, so this fix definitely is an improvement. However, it is not absolutely clear whether case-sensitive or case-insensitive match should be used for parameters and values. The initial RFC2617 specified that: * realm token must be case-insensi

Re: [libmicrohttpd] Digest authentication nonce uniqueness

2022-01-13 Thread Evgeny Grin
Hi Ahmet, Thank for the report. I see some mistakes in our example (related to API complexity that should be improved soon), but these mistakes shouldn't break the example. nonce should be unique and it will be fixed. I'll check it deeper. In the meantime, any additional information and patch

Re: [libmicrohttpd] The alternatives list

2022-01-13 Thread Evgeny Grin
Hi Wilfred, We cannot (and do not want) to promote non-free ("free" as in "free speech") software on GNU site. Especially when you declare your product as "GPL free". GPL does not prevent you from selling your products, but it does give users freedom to choose how to can use your software. G

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.75 released

2021-12-27 Thread Evgeny Grin
n2k/libmicrohttpd/blob/master/ChangeLog> On Sun, 26 Dec 2021, 18:03 Evgeny Grin, <mailto:k...@yandex.ru>> wrote: Dear all, I'm glad to announce the new release of GNU libmicrohttpd library version 0.9.75. This is a correction release. The main improvement i

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.75 released

2021-12-27 Thread Evgeny Grin
ort bugs to our bugtracker at https://bugs.gnunet.org/set_project.php?project_id=10. The documentation (including a reference manual and tutorial) can be found at https://gnu.org/s/libmicrohttpd. -- With the Best Wishes, Evgeny Grin PS Merry Christmas and a Happy New Year. OpenPGP_signature Description:

[libmicrohttpd] GNU libmicrohttpd 0.9.75 released

2021-12-26 Thread Evgeny Grin
ure warnings on specific platforms were fixed; one test further improved. -- With the Best Wishes, Evgeny Grin PS Merry Christmas and a Happy New Year. OpenPGP_signature Description: OpenPGP digital signature

[libmicrohttpd] GNU libmicrohttpd 0.9.74 released

2021-12-19 Thread Evgeny Grin
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 significant addition is the new experimental implementation of WebSockets contributed by David Gausm

Re: [libmicrohttpd] [PATCH] remove exp file

2021-12-14 Thread Evgeny Grin
Rosen, Thanks for the patch. Unfortunately it does not work as llvm-dlltool is too much oversimplified version of GNU dlltool. Unlike MS lib.exe and GNU dlltool, llvm-dlltool can handle either '-d' parameter OR list of objects, but not both at the same time. Another approach has been implemen

Re: [libmicrohttpd] Roadmap for 0.9.74 release?

2021-12-11 Thread Evgeny Grin
I hate writing this, but I have to postpone the release date again. Due to investigation of memory possible leak, the release date is moved to next Wednesday. -- Evgeny On 05.12.2021 21:42, Evgeny Grin wrote: Unfortunately I discovered that FreeBSD needs special handling otherwise new test

Re: [libmicrohttpd] epoll and memory leaks

2021-12-11 Thread Evgeny Grin
t some increase in VIRT.   There is something about the MHD thread pool mode that is problematic for us that requires us to restart our production servers after a few days.  It does not appear to happen when the thread pool is not used or potentially it is some interaction with jemalloc. Erik O

Re: [libmicrohttpd] MHD_CONNECTION_INFO_CLIENT_ADDRESS results don't include port

2021-12-11 Thread Evgeny Grin
Hi Bruce, First of all, you should not read 'struct sockaddr' directly except 'sa_family' member. The idea of 'struct sockaddr' is to be abstract structure "large enough" to hold any specific protocol information. Once you find that 'sa_family' is 'AF_INET' you should cast your 'so_client' poi

Re: [libmicrohttpd] epoll and memory leaks

2021-12-09 Thread Evgeny Grin
Hi Erik, It's hard to move forward without knowing exact MHD version used. Please share information about your MHD version. I suspect that your "Reply-To" header may confuse mailing list system. Do not use "Reply-To" headers with mailing list. -- Evgeny Original Message Fr

Re: [libmicrohttpd] unexpected "Server reached connection limit." failures

2021-12-09 Thread Evgeny Grin
Hi Frank, Do you have any results? Was the bug fixed? -- Evgeny On 06.12.2021 10:52, Evgeny Grin wrote: Let me know please when you finished testing of the new code. OpenPGP_signature Description: OpenPGP digital signature

Re: [libmicrohttpd] unexpected "Server reached connection limit." failures

2021-12-05 Thread Evgeny Grin
callback which may integrate textual description with error codes and connection/daemon handles. I'd like to know your ideas for such callback. Let me know please when you finished testing of the new code. -- Evgeny On 06.12.2021 2:39, Frank Ch. Eigler wrote: Evgeny Grin wrote: Thank

Re: [libmicrohttpd] Roadmap for 0.9.74 release?

2021-12-05 Thread Evgeny Grin
, Evgeny Grin wrote: Hello Klaus, Currently all know problems has been fixed (the last one has been fixed today, it was a problem in test client implementation, not in MHD itself). If no new problems will be discovered during testing on various platforms and kernels, the new version will be released

Re: [libmicrohttpd] unexpected "Server reached connection limit." failures

2021-12-05 Thread Evgeny Grin
: Evgeny Grin wrote: Could you share your MHD flags, options, and commands you use to measure MHD load? That could be tough, but see git://sourceware.org/git/elfutils.git debuginfod/debuginfod.cxx. The key bits appear to be: - cgroups/ulimits impose a limit of a small number of tasks (threads

Re: [libmicrohttpd] unexpected "Server reached connection limit." failures

2021-12-04 Thread Evgeny Grin
Could you share your MHD flags, options, and commands you use to measure MHD load? I'll try to reproduce your situation. -- Evgeny On 04.12.2021 19:40, Frank Ch. Eigler wrote: Evgeny Grin wrote: Which MHD version is used? 0.9.73 from fedora 34+. (I suspect the problem is incom

Re: [libmicrohttpd] unexpected "Server reached connection limit." failures

2021-12-04 Thread Evgeny Grin
Hi Frank, Which MHD version is used? -- Evgeny On 04.12.2021 18:28, Frank Ch. Eigler wrote: Christian Grothoff wrote: I would first try adding/setting the timeout option for the MHD server. That might help if otherwise neither your reverse proxy nor MHD close connections and thus results th

Re: [libmicrohttpd] large incremental responses

2021-12-04 Thread Evgeny Grin
Hi Erik, The response transmission speed is determined by two factors: 1. Now quick data is consumed by remote side, 2. Now quick data can be produced. You cannot just produce data by portions, you need to check whether remote side is ready to get next piece of data. It doesn't matter how slow

Re: [libmicrohttpd] Adding to projects that use libmicrohttpd list

2021-12-03 Thread Evgeny Grin
Hi Gavin, Done. -- Evgeny On 02.12.2021 23:58, Gavin Henry wrote: Hi all, Could I add https://github.com/SentryPeer/SentryPeer to the list? or https://sentrypeer.org Thanks. OpenPGP_signature Description: OpenPGP digital signature

Re: [libmicrohttpd] large incremental responses

2021-12-03 Thread Evgeny Grin
Hi Erik, You need to create response by MHD_create_response_from_callback(). Use 'MHD_SIZE_UNKNOWN' if size is not known in advance. When data callback is called by MHD, provide all data you have at that moment (but not more than requested by MHD of course). If you don't have any data availabl

Re: [libmicrohttpd] Docs and A "minimal example" - warning: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type

2021-12-01 Thread Evgeny Grin
Upgrade of MHD indeed is the better way as you will get more features and fixes. -- Evgeny On 01.12.2021 15:30, Gavin Henry wrote: Hi Evgeny, Thanks. I'm at the journey point now. I am looking to upgrade the runners in GitHub CI, but will look at that header too. Gavin. OpenPGP_signatu

Re: [libmicrohttpd] Docs and A "minimal example" - warning: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type

2021-12-01 Thread Evgeny Grin
Hi Gavin, The issue is related to the API change introduced by v0.9.71. You can use the trick to make your code universally compatible with old and new MHD versions as suggested by Christian: https://git.gnunet.org/gnunet.git/plain/src/include/gnunet_mhd_compat.h -- Wishes, Evgeny On 01.12.20

Re: [libmicrohttpd] Roadmap for 0.9.74 release?

2021-11-25 Thread Evgeny Grin
Hello Klaus, Currently all know problems has been fixed (the last one has been fixed today, it was a problem in test client implementation, not in MHD itself). If no new problems will be discovered during testing on various platforms and kernels, the new version will be released by the end of

Re: [libmicrohttpd] epoll and memory leaks

2021-11-25 Thread Evgeny Grin
Hi Erik, Which MHD version are you using? Some problems with externally added connections with epoll mode were fixed in v0.9.72. If you have any blocking calls, make sure that you use connection suspend/resume. Alternatively, you can you use thread-per-connection mode, this is less efficient

Re: [libmicrohttpd] Update for websocket library

2021-10-31 Thread Evgeny Grin
Hi David, Thanks a lot for the update. Looks good. It's very nice the you updated the documentation as well! It was imported into git. After some testing, portability fixes, and probably some updates, the code will be moved from "experimental" area. Until then feel free to update the code (in

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-28 Thread Evgeny Grin
Hi José, On 28.09.2021 18:44, José Bollo wrote: Function MHD_run_wait() was added for upcoming version 0.9.74, but it does not return flag "need to re-run". MHD_get_timeout() already serves for this purpose. I finally had time to look at this new function. It can be improved by returning a sta

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-25 Thread Evgeny Grin
Hi José, Thanks for the report! If MHD needs to (re-)run MHD_run() immediately MHD_get_timeout() must return zero timeout. You don't need to re-run it if no timeout is returned. Zero timeout if connection cleanup is pending was enforced by Christian in version 0.9.73. See https://lists.gnu.o

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-25 Thread Evgeny Grin
Hi José, Original Message From: José Bollo Sent: Friday, September 24, 2021, 15:56 UTC+3 Subject: [libmicrohttpd] race condition on 0.9.73 Hi Evgeny, Hi all, Firstly, protecting MHD_run made the job, the crash disappears and valgrind is happy. Thank you for that efficient su

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-24 Thread Evgeny Grin
On 23.09.2021 22:35, José Bollo wrote: On Thu, 23 Sep 2021 19:57:23 +0300 Evgeny Grin wrote: On 23.09.2021 18:43, José Bollo wrote: For sure you can run MHD with "external poll" mode, but you must ensure that only single thread is calling MHD_run() at any given moment of ti

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-23 Thread Evgeny Grin
On 23.09.2021 18:43, José Bollo wrote: For sure you can run MHD with "external poll" mode, but you must ensure that only single thread is calling MHD_run() at any given moment of time. Okay, that is a good hint, thanks. I'm going to first track concurrent use of MHD_run. FYI, I tried the late

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-23 Thread Evgeny Grin
Hi José, For sure you can run MHD with "external poll" mode, but you must ensure that only single thread is calling MHD_run() at any given moment of time. If you want to call several copies of MHD_run(), make sure that you have individual copies of MHD for each thread (start MHD by MHD_start

Re: [libmicrohttpd] FAIL: test_tls_options

2021-09-16 Thread Evgeny Grin
As SSL3 is considered unsafe, it can be blocked by OS/distribution in TLS lib. Recent GnuTLS versions block it by default at compile-time. The test was fixed by https://git.gnunet.org/libmicrohttpd.git/commit/?id=386b21da1b69be8138e5256b8906a0ea24b07633. You can use a smaller patch https://g

Re: [libmicrohttpd] Busy waiting up to one second using connection timeout

2021-08-12 Thread Evgeny Grin
Please see my comments below. On 12.08.2021 12:36, Irion, Alexander wrote: I would say that the timer granularity and the fix are two different things, even if granularity would be finer, the checking condition like before was wrong and would lead to unnecessary busy cycles. That's correct i

Re: [libmicrohttpd] Busy waiting up to one second using connection timeout

2021-08-12 Thread Evgeny Grin
The report itself is correct, thanks for this! However while the patch fixed one problem, it creates another one. The problem connected to low granularity (rounded to one second) of the MHD's internal timer. If connection timeout is set to one second (for example) then connection may expire at

Re: [libmicrohttpd] Cannot build libmicrohttpd on Windows using Visual Studio 2017

2021-07-26 Thread Evgeny Grin
Hi Pierre, Thanks for the report. -- Best Wishes,Evgeny Grin   22.07.2021, 13:04, "Pierre Y." :Hi Evgeny, I can confirm that the current master now builds successfully without errors or warnings using Visual Studio 2017. Thank you very much Evgeny --Pierre On Wed, Jul 21, 2021 at 10:28

Re: [libmicrohttpd] Cannot build libmicrohttpd on Windows using Visual Studio 2017

2021-07-21 Thread Evgeny Grin
Hi Pierre, Can you retry with the current git master?Visual Studio compilation should be fixed now. -- Best Wishes,Evgeny Grin   20.07.2021, 22:09, "Evgeny Grin" :Hi Pierre,The Visual Studio project files are not yet updated.They will be fixed before the next release.At the moment you c

Re: [libmicrohttpd] Cannot build libmicrohttpd on Windows using Visual Studio 2017

2021-07-20 Thread Evgeny Grin
Hi Pierre, The Visual Studio project files are not yet updated. They will be fixed before the next release. At the moment you can use the latest release (0.9.73). -- Wishes, Evgeny On 20.07.2021 11:59, Pierre Y. wrote: Hello, I'm trying to build libmicrohttpd on Windows using Visual Studio 20

Re: [libmicrohttpd] Configuring ciphers

2021-06-19 Thread Evgeny Grin
Hello Erik, MHD generally relies on GnuTLS for handling everything related to TLS (and SSL). All recent versions of GnuTLS have SSL3.0 disabled by default, so you don't need to do anything to disable SSL3.0 (as it is already disabled). However you can provide your own ciphers preferences by

Re: [libmicrohttpd] chunked data mixed across multiple GETs

2021-06-19 Thread Evgeny Grin
call MHD_AccessHandlerCallback, until the previous (chunked) response has completed? Looking at the MHD_FLAGS enumeration,  nothing is jumping out at me. On 18/06/2021 15:18, Evgeny Grin wrote: Hi Conor, If I've got you right, the question is not about large responses, but about simultaneous h

Re: [libmicrohttpd] chunked data mixed across multiple GETs

2021-06-18 Thread Evgeny Grin
Hi Conor, If I've got you right, the question is not about large responses, but about simultaneous handling of several responses at the same time. It is implemented very easily. When your application processes request, it should decide how you construct your response: for example, make reque

Re: [libmicrohttpd] Problem with HTTP/1.1 chunked packets when connection is about to close

2021-04-26 Thread Evgeny Grin
Привет, Яна! Actually this behaviour is not a bug. Chunked encoding produces binary larger output and makes heavier system and network load, so MHD tries to avoid chunked output if possible. If you provide response size as the first argument for MHD_create_response_from_callback() MHD will ne

[libmicrohttpd] GNU libmicrohttpd 0.9.73 released

2021-04-25 Thread Evgeny Grin
Dear all, I'm glad to announce the release of GNU libmicrohttpd 0.9.73. This release brings new features, improvements, and a few fixes. The most important addition is the new function for vector-backed responses, based on the patch contributed by NASA engineers. Other changes include compatibili

Re: [libmicrohttpd] [EXTERNAL] Re: New Features: Create response from an IOVEC and Thread-safe Adding Connections to an EPoll Internal Thread MHD_Daemon

2021-01-17 Thread Evgeny Grin
reply, in case you are not on the list... Forwarded Message Subject: Re: [libmicrohttpd] [EXTERNAL] Re: New Features: Create response from an IOVEC and Thread-safe Adding Connections to an EPoll Internal Thread MHD_Daemon Date: Fri, 15 Jan 2021 12:08:03 +0300 From: Evgeny Grin Reply-To: libmicr

  1   2   3   4   >