On 20.04.2016 22:26, José Bollo wrote: > Le Wed, 20 Apr 2016 20:42:48 +0300, > Evgeny Grin <[email protected]> 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
signature.asc
Description: OpenPGP digital signature
