|
From: | John Duncan |
Subject: | Re: [libmicrohttpd] How to access raw request bytes sent to a request handler (and total request size)? |
Date: | Tue, 25 Apr 2017 12:02:15 -1000 |
Hi John,
The raw request data is unavailable as MHD processed it in-place
(zero-copy!) to give the parsed headers to the application.
However, it should be relatively easy to modify MHD to just return the
number of bytes in the header, if that would be sufficient?
Happy hacking!
Christian
On 04/18/2017 02:50 AM, John Duncan wrote:
> I'd like to be able to access the raw (decrypted) request data recieved
> and total request size from within a request handler if it's available.
> I'd like to use it for data rate limiting with regards to individual
> request handlers. (eg. one request handler has a 8kbs limit, one has a
> 16kbs limit, that kinda thing)
>
> I know you can use MHD_get_connection_values to get access to all
> component data, but I'd prefer to get the raw sent request if possible
> as it'd be very easy to just use the request length as an additive value
> to calculate the bytes-per-second average for any given request handler.
>
> The alternative is using iterators with MHD_get_connection_values, which
> come out to be less efficient.
>
>
> Thanks!
> ~JD
[Prev in Thread] | Current Thread | [Next in Thread] |