mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-22 12:36:02 +03:00
Add quotes around the boundary. (#278)
This will support bounderies with non whitespace
This commit is contained in:
parent
e177e13a0c
commit
47f816ac56
@ -96,7 +96,7 @@ class RestClient
|
||||
$builder->addResource($file['name'], $file['contents'], $file);
|
||||
}
|
||||
$body = $builder->build();
|
||||
$headers['Content-Type'] = 'multipart/form-data; boundary='.$builder->getBoundary();
|
||||
$headers['Content-Type'] = 'multipart/form-data; boundary="'.$builder->getBoundary().'"';
|
||||
} elseif (is_array($body)) {
|
||||
$body = http_build_query($body);
|
||||
$headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
|
@ -65,7 +65,7 @@ class RequestBuilder
|
||||
$multipartStream = $builder->build();
|
||||
$boundary = $builder->getBoundary();
|
||||
|
||||
$headers['Content-Type'] = 'multipart/form-data; boundary='.$boundary;
|
||||
$headers['Content-Type'] = 'multipart/form-data; boundary="'.$boundary.'"';
|
||||
|
||||
return $this->getRequestFactory()->createRequest($method, $uri, $headers, $multipartStream);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user