On 05/19/2013 09:33 AM, Georgios Petasis wrote: > Στις 18/5/2013 18:31, ο/η Massimo Manghi έγραψε: >> We have two type of client data handlers >> >> 1 - ApacheRequest_parse_multipart (handling "multipart/form-data") >> >> 2 - ApacheRequest_parse_urlencoded (handling every other case) >> >> George hit a problem because ApacheRequest_parse_urlencoded itself >> checks for the Content-Type header and if it's neither >> "application/x-www-form-urlencoded" nor "text/xml" returns DENIED. For >> some reason I couldn't pin down Apache's framework in this case turns >> a DENIED into a HTTP_METHOD_NOT_ALLOWED (DENIED is simply returned >> when the handler refuses to handle a request, as Rivet_SendContent does) >> >> There is still some redundancy in the code and there is still space >> for improvements. Notice that also ApacheRequest_parse_urlencoded >> rechecks the method making the whole process trivially subobtimal. I >> simplified the whole business removing the checks on the methods >> except for the POST method in order to detect a multipart/form-data >> message. >> >> Would you please test the attached patch and let me know if it's ok >> for you? > > The patch works for me. > > George
Jeff, is it OK for you? I think the module can be further improved by removing other tests (or making them configurable?), but I don't have the time now for delving into technical documentation. So if you think so I would commit this patch into trunk -- -- Massimo Manghi Dipartimento di Neuroscienze Unità di Biofisica e Fisica Sanitaria via Volturno 39 43125 Parma --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
