52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'app/lib/burp/util/upload_handler.rb', line 52
def self.handle_raw_data tempfile,request
if tempfile.is_a? String
file = Tempfile.new('foo',:encoding => 'ascii-8bit')
while s = request.env['rack.input'].read(16*1024)
file.write(s)
end
file.flush
def file.original_filename
@file_name
end
def file.tempfile
self
end
def file.original_filename= value
@file_name = value
end
file.original_filename = File.basename(tempfile)
file
else
tempfile
end
end
|