libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] How to access raw request bytes sent to a request ha


From: Christian Grothoff
Subject: Re: [libmicrohttpd] How to access raw request bytes sent to a request handler (and total request size)?
Date: Thu, 20 Apr 2017 22:57:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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