Skip to content

Commit

Permalink
We are always uploading application/octet-streams, so why bother dete…
Browse files Browse the repository at this point in the history
…cting it.

At some point, when it's Hoe addiction has been solved, I'll just depend on multipart-post.
  • Loading branch information
tomlea committed Feb 12, 2010
1 parent 2464435 commit 45a1e77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -6,7 +6,7 @@ task :default => :package

spec = Gem::Specification.new do |s|
s.name = "geminabox"
s.version = "0.2.0"
s.version = "0.2.1"
s.summary = "Really simple rubygem hosting"
s.author = "Tom Lea"
s.email = "contrib@tomlea.co.uk"
Expand Down
3 changes: 1 addition & 2 deletions lib/rubygems/commands/inabox_command.rb
Expand Up @@ -72,7 +72,6 @@ def geminabox_host=(host)
end

module Multipart
require 'mime/types'
require 'net/http'
require 'cgi'

Expand All @@ -97,7 +96,7 @@ def initialize( k, filename, content )
end

def to_multipart
return "Content-Disposition: form-data; name=\"#{k}\"; filename=\"#{filename}\"\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-Type: #{MIME::Types.type_for(@filename)}\r\n\r\n" + content + "\r\n"
return "Content-Disposition: form-data; name=\"#{k}\"; filename=\"#{filename}\"\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-Type: application/octet-stream\r\n\r\n" + content + "\r\n"
end
end

Expand Down

0 comments on commit 45a1e77

Please sign in to comment.