PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/s3/Aws/Api/Serializer/RestXmlSerializer.php +4 -2 1.2.7 → 1.4.2 View file →
@@ -15,9 +15,9 @@
15 15 * @param Service $api Service API description
16 16 * @param string $endpoint Endpoint to connect to
17 17 * @param XmlBody $xmlBody Optional XML formatter to use
18 18 */
19 - public function __construct(Service $api, $endpoint, XmlBody $xmlBody = null)
19 + public function __construct(Service $api, $endpoint, ?XmlBody $xmlBody = null)
20 20 {
21 21 parent::__construct($api, $endpoint);
22 22 $this->xmlBody = $xmlBody ?: new XmlBody($api);
23 23 }
@@ -23,9 +23,11 @@
23 23 }
24 24 protected function payload(StructureShape $member, array $value, array &$opts)
25 25 {
26 26 $opts['headers']['Content-Type'] = 'application/xml';
27 - $opts['body'] = $this->getXmlBody($member, $value);
27 + $body = $this->getXmlBody($member, $value);
28 + $opts['headers']['Content-Length'] = \strlen($body);
29 + $opts['body'] = $body;
28 30 }
29 31 /**
30 32 * @param StructureShape $member
31 33 * @param array $value