mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-09 04:46:10 +10:00
Merge branch '20150326.application_json_utf8'
This commit is contained in:
+2
-2
@@ -65,7 +65,7 @@ module Qiniu
|
||||
end
|
||||
|
||||
content_type = resp_headers["content-type"][0]
|
||||
if !content_type.nil? && content_type == API_RESULT_MIMETYPE then
|
||||
if !content_type.nil? && !content_type.downcase.index(API_RESULT_MIMETYPE).nil? then
|
||||
# 如果是JSON格式,则反序列化
|
||||
resp_body = Utils.safe_json_parse(resp_body)
|
||||
end
|
||||
@@ -117,7 +117,7 @@ module Qiniu
|
||||
end
|
||||
|
||||
content_type = resp_headers["content-type"][0]
|
||||
if !content_type.nil? && content_type == API_RESULT_MIMETYPE then
|
||||
if !content_type.nil? && !content_type.downcase.index(API_RESULT_MIMETYPE).nil? then
|
||||
# 如果是JSON格式,则反序列化
|
||||
resp_body = Utils.safe_json_parse(resp_body)
|
||||
end
|
||||
|
||||
@@ -59,14 +59,18 @@ module Qiniu
|
||||
end
|
||||
end
|
||||
|
||||
=begin
|
||||
context ".exif" do
|
||||
it "should works" do
|
||||
code, data = Qiniu::Fop::Image.exif(@source_image_url)
|
||||
result = Qiniu.get(@bucket, 'gogopher.jpg')
|
||||
result["url"].should_not be_empty
|
||||
puts result.inspect
|
||||
|
||||
code, data, headers = Qiniu::Fop::Image.exif(result["url"])
|
||||
code.should == 200
|
||||
puts data.inspect
|
||||
puts headers.inspect
|
||||
end
|
||||
end
|
||||
=end
|
||||
|
||||
context ".mogrify_preview_url" do
|
||||
it "should works" do
|
||||
|
||||
Reference in New Issue
Block a user