Method: HTTP::Message.mime_type

Defined in:
lib/httpclient/http.rb

.mime_type(path) ⇒ Object

:nodoc:



793
794
795
796
797
798
799
800
801
802
803
804
# File 'lib/httpclient/http.rb', line 793

def mime_type(path) # :nodoc:
  if @@mime_type_handler
    res = @@mime_type_handler.call(path)
    if !res || res.to_s == ''
      return 'application/octet-stream'
    else
      return res
    end
  else
    internal_mime_type(path)
  end
end