Re: Concurrent access to request body by multiple modules

2021-02-09 Thread Tim Wetzel

Hi again,


after going through with my module development you so nicely gave me a 
pointer in the right direction for, I would like to announce here that I 
published the module on github:


https://github.com/wetzel-desy/mod_want_digest

It is an implementation of RFC3230 for the Apache httpd and returns 
instance digests in the form of MD5, SHA1 and ADLER32 checksums for 
files on the server. In order to make the response faster, I opted to 
calculate the digest against the incoming file on a PUT request and save 
them for later returning to the inquirer on a HEAD/GET request with a 
header token "Want-Digest: MD5" (example).


If anyone is interested in this, please let me know. I would be glad to 
answer questions and/or take feedback on the module.



Cheers,

Tim

Am 01.12.20 um 16:44 schrieb Tim Wetzel:

Hi Nick,

thank you for the quick answer and the pointer to mod_request. I've 
had a look at it before but, as you already pointed out, it is not fit 
for the case at hand: the server I am deploying this module with will 
see arbitrary-sized requests with files up to several GB in size. 
Keeping request-bodies of that size in RAM when several concurrent 
requests fly in will not be possible.


So, I will have a closer look at writing an input filter for this 
purpose, which is what I had in mind as a viable option already. But I 
wanted to check if anyone here had a different solution idea I wasn't 
seeing.



Thanks again and have a nice day.

Cheers,

Tim

Am 01.12.20 um 16:01 schrieb Nick Kew:



On 1 Dec 2020, at 14:29, Tim Wetzel  wrote:

Is there any possibility of having the module use, for example, a 
bucket brigade or anything I am not aware of that is already in use 
by WebDAV and thus operate on the request body of a file from a PUT 
request in parallel/concurrently to WebDAV?

How does mod_request relate to your needs?

If you can't use it (e.g. because you have to deal with 
arbitrary-sized requests),
your choices would then be to adapt it (e.g. provide for it to use a 
file bucket
to cache requests) or to go a level down and write your own input 
filter module.


That is, if I've understood you aright?


--
Tim Wetzel
Deutsches Elektronen-Synchrotron DESY
Information Technology / RIC
Notkestrasse 85
22607 Hamburg, Germany

E-Mail :  tim.wet...@desy.de
Phone  :  +49 (0)40 8998 2911
Room   :  02B / 214



Re: Concurrent access to request body by multiple modules

2020-12-01 Thread Nick Kew



> On 1 Dec 2020, at 14:29, Tim Wetzel  wrote:
> 
> Is there any possibility of having the module use, for example, a bucket 
> brigade or anything I am not aware of that is already in use by WebDAV and 
> thus operate on the request body of a file from a PUT request in 
> parallel/concurrently to WebDAV?

How does mod_request relate to your needs?

If you can't use it (e.g. because you have to deal with arbitrary-sized 
requests),
your choices would then be to adapt it (e.g. provide for it to use a file 
bucket 
to cache requests) or to go a level down and write your own input filter module.

That is, if I've understood you aright?

-- 
Nick Kew