[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] upgrading connection

From: Evgeny Grin
Subject: Re: [libmicrohttpd] upgrading connection
Date: Thu, 21 Apr 2016 00:35:14 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 20.04.2016 22:26, José Bollo wrote:
> Le Wed, 20 Apr 2016 20:42:48 +0300,
> Evgeny Grin <address@hidden> a écrit :
>> On 20.04.2016 18:54, José Bollo wrote:

>>> I use on suspend (not resume)
>>> MHD_get_connection_info(connection,MHD_CONNECTION_INFO_CONNECTION_FD)->connect_fd
>> I suppose that you check return value for NULL and used this
>> simplified form only to illustrate idea. ;)
> ohoho does it means that MHD_get_connection_info could return NULL even
> when all is parameters are valid?

Currently it may return NULL only if requested information about SSL
session when SSL is not active or unknown type of information is requested.
But you never know what will be changed in future. Of course
libmicrohttpd tries to maintain ABI and API compatibility, but it not
always possible.
Moreover, you can't control which shared version will be used with your
application and if particular shared lib didn't know some type of
requested information, it will return NULL.
So it's good idea to always check returned values, especially pointers
before dereferencing.

>>> Anyway the connection must be kept alive. No?
>> Right, handling of "connection: " header must be improved.
> May I dream that the minimal patch that removed the test to upgrade
> in keep_alive could be accepted?

It should be fixed correctly before next release (not counting upcoming
0.9.50, which will be only tested bugfix release).

Best Wishes,
Evgeny Grin

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]