Op 16 jun 2010, om 22:45 heeft tschundeee het volgende geschreven:

> I like that idea. I don't see any downsides for that. Are there
> performance differences when submitting an multipart form?

Yes there are: multipart forms send more data since every field has its own 
MIME header. From RFC2388:

"The multipart/form-data encoding has a high overhead and performance impact if 
there are many fields with short values. However, in practice, for the forms in 
use, for example, in HTML, the average overhead is not significant."

If this overhead was deemed not significant in August 1998, in my opinion it is 
even less significant now and this is a change we could make without any 
problems.

Joost.


> 
> On Jun 14, 9:33 pm, joost <[email protected]> wrote:
>> Forms without explicit enctype are submitted as application/x-www-form-
>> urlencoded. This is the default behaviour in Rails. However, this
>> enctype does not allow transmission of binary data (files).
>> 
>> Would it not make sense to specify the enctype multipart/form-data by
>> default instead? i.e. all the form_for helpers would add this enctype
>> to the form tag, unless overriden by the developer.
>> 
>> This way, file uploads "just work" and normal key/value pairs continue
>> to work as well. There is no downside. I browsed through lighthouse
>> and only found obscure NN4 bugs related to multipart/form-data, which
>> I believe we can safely ignore. Even IE4 supports this enctype.
>> 
>> I can fork and make this change, but would like to float this idea
>> beforehand.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-core?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to