lib/handsoap/http/drivers/abstract_driver.rb in handsoap-1.1.8 vs lib/handsoap/http/drivers/abstract_driver.rb in handsoap-1.2.2

- old
+ new

@@ -62,11 +62,17 @@ # start multipart/form-data content_io.binmode if defined? content_io.binmode boundary_size = boundary.size + "\r\n".size content_length -= boundary_size status = content_io.read(boundary_size) + if nil == status raise EOFError, "no content body" + elsif "\r\n" + boundary == status + extra = content_io.read("\r\n".size) + unless extra == "\r\n" + raise EOFError, "parse error while reading boundary" + end elsif boundary + "\r\n" != status raise EOFError, "bad content body" end parts = []