libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] MHD_lookup_connection_value for trailing keys


From: p . wassi
Subject: [libmicrohttpd] MHD_lookup_connection_value for trailing keys
Date: Thu, 4 Jun 2020 20:37:54 +0200

Hi all,

I've got a bit of a problem understanding how to use 
MHD_lookup_connection_value for getting
access to trailing keys.
The documentation says:
> A value of NULL for key can be used to lookup ’trailing’ values without a key,
> for example if a URI is of the form “http://example.com/?trailer”, a key of 
> NULL
> can be used to access “tailer" The function returns NULL if no matching item 
> was found. 

I'd expect that MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, 
NULL)
would return "trailer", which is not the case. It returns NULL.

During a debug session, it came up that this particular request's 
/headers_received/ seems to be
processed like this:
kind = MHD_GET_ARGUMENT_KIND, header = "trailer", value = NULL
(...)

The first for-loop in MHD_lookup_connection_value_n would stop once it found
a header being NULL (which is not the case here). Furthermore, if it actually
found the correct key-value-pair, it would return the value, which is NULL here.

Is there a way to access "trailer" as it is described in the documentation?

Thanks, best regards,
Paul



reply via email to

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