mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-07 00:00:31 -05:00
Merge branch 'fix-filemagic'
This commit is contained in:
commit
f99abc38e2
5
doc/release_notes/0_18_6.md
Normal file
5
doc/release_notes/0_18_6.md
Normal file
@ -0,0 +1,5 @@
|
||||
# 0.18.6
|
||||
|
||||
## Bugfixes
|
||||
|
||||
* multipart plugin: fixed missing constant in `filemagic` integration.
|
||||
@ -9,6 +9,8 @@ module HTTPX
|
||||
|
||||
# inspired by https://github.com/shrinerb/shrine/blob/master/lib/shrine/plugins/determine_mime_type.rb
|
||||
if defined?(FileMagic)
|
||||
MAGIC_NUMBER = 256 * 1024
|
||||
|
||||
def call(file, _)
|
||||
return nil if file.eof? # FileMagic returns "application/x-empty" for empty files
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module HTTPX
|
||||
VERSION = "0.18.5"
|
||||
VERSION = "0.18.6"
|
||||
end
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
-
|
||||
-
|
||||
name: "0.18.6"
|
||||
path: "0_18_6_md.html"
|
||||
-
|
||||
name: "0.18.5"
|
||||
path: "0_18_5_md.html"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user