logo       

Re: Want feedback on Mongrel patch for handling partial PUT requests: msg#00142

lang.ruby.mongrel.general

Subject: Re: Want feedback on Mongrel patch for handling partial PUT requests


On Jan 23, 2007, at 12:09 AM, Zed A. Shaw wrote:

On Mon, 22 Jan 2007 19:27:35 -0600
cremes.devlist-ee4meeAH724@xxxxxxxxxxxxxxxx wrote:

By default, Mongrel will delete the HTTP request body and short
circuit calling any handlers if a request is interrupted or
incomplete. Unfortunately, this breaks any attempt to correctly
handle a partial PUT. (BTW, PUT is *way* more efficient for uploads
compared to POST which requires a MIME parsing step.) So, about a
month ago I wrote up some patches to Mongrel 0.3.18 that allowed
Mongrel to properly handle partial PUT requests. I sent the patch &
tests to Zed for comment but never really heard back.

I'll take a look this weekend, but you really should have tests to go with this just to make sure I'm trying it the way you are trying it.

Here are the patches against Mongrel 1.0 plus a test file.

Attachment: test_upload.rb
Description: Text Data

Attachment: handlers.diff
Description: Binary data

Attachment: mongrel.diff
Description: Binary data


Also, seeing how it can improve or change the upload progress problem (the fact that it sucks) would be a good first step.

That problem was a bit out of scope for me so I don't think this helps much. The common assumption is that people are using POST for uploads which this patch doesn't address at all.

Otherwise, I'll look and get back to you. Sorry I didn't get in touch with you earlier. Just been busy.

No problem; we're all busy!

cr



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise