[Catalyst] HTTP::Body(::MultiPart) RFC md5 digests for uploads

Armin Obersteiner armin at xos.net
Thu Jun 29 00:00:54 CEST 2006


hi!

> It took me some time to track down the fact that HTTP::Body::MultiPart was 
> responsible for the writing of request data chunks to temporary files. 
> Attached is a first try at this which includes
>  patch HTTP::Body::Multipart to create a Digest::MD5 object and ->add chunks 
> of incoming data to it. 
>  patch Catalyst::Request::Upload to add and accessor for 'md5'
>  patch &Catalyst::Engine::prepare_uploads to take the upload object(s) from 
> request->{_body}->upload  and create Catalyst::Request::Upload object 
> including the 'md5' attribute.
> 
> I welcome comments about the sense and usefullness of this :)

looks useful. but i think a generic patch with an "checksum" accessor and
a config choice of "Digest::MD5", "Digest::SHA1", ... would be better?

can this be done within a plugin too?

Ciao,
	Armin
--
armin at xos.net                        pgp public key on request        CU



More information about the Catalyst mailing list