mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-06 00:02:08 -04:00
multipart decoding: fail if no boundary found in header
This commit is contained in:
parent
e1ee8c69dc
commit
802c47a037
@ -49,7 +49,9 @@ module HTTPX::Plugins
|
||||
def initialize(response)
|
||||
@boundary = begin
|
||||
m = response.headers["content-type"].to_s[BOUNDARY_RE, 1]
|
||||
m && m.strip
|
||||
raise Error, "no boundary declared in content-type header" unless m
|
||||
|
||||
m.strip
|
||||
end
|
||||
@buffer = "".b
|
||||
@parts = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user