GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Fixed 2 problems with multipart form upload after application is deployed 
to Tomcat via warble: (1) The @body object in this environment is an IO 
object, not a StringIO, so doesn't have a size method, and (2) 'tempfile' 
needs to be explicitly required.

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
paulboone (author)
Sat May 31 08:22:07 -0700 2008
michaelklishin (committer)
Sun Jun 01 23:38:13 -0700 2008
commit  815ba9785955942596f5f3db378f60e42ecc29cd
tree    c3b75b559f54479b4cdc7a640feddebfbd6c8845
parent  34b0ccb9db639ed27e6f1158eb712e0c2a8e234c
...
 
 
1
2
3
...
115
116
117
118
 
119
120
 
121
122
123
...
1
2
3
4
5
...
117
118
119
 
120
121
 
122
123
124
125
0
@@ -1,3 +1,5 @@
0
+require 'tempfile'
0
+
0
 module Merb
0
   
0
   class Request
0
@@ -115,9 +117,9 @@ module Merb
0
     def multipart_params
0
       @multipart_params ||=
0
         begin
0
- # if the content-type is multipart and there's stuff in the body,
0
+ # if the content-type is multipart
0
           # parse the multipart. Otherwise return {}
0
- if (Merb::Const::MULTIPART_REGEXP =~ content_type && @body.size > 0)
0
+ if (Merb::Const::MULTIPART_REGEXP =~ content_type)
0
             self.class.parse_multipart(@body, $1, content_length)
0
           else
0
             {}

Comments

    No one has commented yet.