PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » SOAP » Bug #8053

Ability to configure attachment encoding

Details

Request #8053Ability to configure attachment encoding
Submitted2006-06-28 11:03 UTC
Fromsimon at simonellistonball dot com
StatusNo Feedback
PackageSOAP
PHP VersionIrrelevant
OSn/a
Roadmaps(Not assigned)

Comments

[2006-06-28 11:03 UTC] simon at simonellistonball dot com

Description:
------------
We would like to be able to configure the MIME/DIME attachment
encoding type (currently hard-coded as base64, which is
incompatible with some of the Web Services we use, including
Amazon's merchant interface).

The ability to change this value to something like 7bit would
be very helpful.

The hard coded values are in SOAP_Base::_makeMimeMessage

[2006-07-25 10:10 UTC] voituk at ukr dot net

Hi!
There is a diff to add this feature:

diff -r old\SOAP\Base.php SOAP\Base.php
1022c1022
< function _makeMimeMessage(&$xml, $encoding = SOAP_DEFAULT_ENCODING)
---
> function _makeMimeMessage(&$xml, $encoding = SOAP_DEFAULT_ENCODING, $xml_part_transfer_encoding = null)
1039c1039,1042
< $params['encoding'] = 'base64';
---
> if (($xml_part_transfer_encoding != 'none')
> && ($xml_part_transfer_encoding !== false)) {
> $params['encoding'] = 'base64';
> }
diff -r old\SOAP\Client.php PEAR\SOAP\Client.php
619c619,620
< $this->_encoding);
---
> $this->_encoding,
> $this->__options['xml_part_transfer_encoding']);
diff -r old\SOAP\Value.php PEAR\SOAP\Value.php
185a186
> * @param string $encoding Specify attachment content transfer encoding
188c189
< $filename, $file = null)
---
> $filename, $file = null, $encoding=null)
211c212
< 'encoding' => 'base64',
---
> 'encoding' => empty($encoding)?'base64':$encoding,

[2006-07-27 11:11 UTC] voituk at ukr dot net

Hi!
Here is в unified diff
http://voituk.kiev.ua/dev-voting/soap.20060727.patch

How to create diff that can be used by "patch" util?