cvs: pear /Net_DIME DIME.php package.xml /Net_DIME/test dime_message_test.php dime_record_test.php

From: Date: Mon, 13 May 2002 03:02:24 +0000
Subject: cvs: pear /Net_DIME DIME.php package.xml /Net_DIME/test dime_message_test.php dime_record_test.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3792@lists.php.net to get a copy of this message
shane Sun May 12 23:02:24 2002 EDT Added files: /pear/Net_DIME DIME.php package.xml /pear/Net_DIME/test dime_message_test.php dime_record_test.php Log: Draft version of DIME protocol. This should eventually probably be rewritten in C, but it's not significant overhead anyway.

Index: pear/Net_DIME/DIME.php +++ pear/Net_DIME/DIME.php <?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2002 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Shane Caraveo <shane@caraveo.com> | // +----------------------------------------------------------------------+ // // $Id: DIME.php,v 1.1 2002/05/13 03:02:24 shane Exp $ // require_once 'PEAR.php'; /** * * DIME Encoding/Decoding * * What is it? * This class enables you to manipulate and build * a DIME encapsulated message. * * http://search.ietf.org/internet-drafts/draft-nielsen-dime-01.txt * * TODO: lots of stuff needs to be tested. * Definitily have to go through DIME spec and * make things work right, most importantly, sec 3.3 * make examples, document * * see test/dime_mesage_test.php for example of usage * * @author Shane Caraveo <shane@caraveo.com> * @version $Revision: 1.1 $ * @package Net_DIME */ define('DIME_TYPE_UNCHANGED',0x00); define('DIME_TYPE_MEDIA',0x01); define('DIME_TYPE_URI',0x02); define('DIME_TYPE_UNKNOWN',0x03); define('DIME_TYPE_NONE',0x04); define('DIME_RECORD_HEADER',8); class DIME_Record extends PEAR { // these are used to hold the padded length var $ID_LENGTH = 0; var $TYPE_LENGTH = 0; var $DATA_LENGTH = 0; var $_haveID = FALSE; var $_haveType = FALSE; var $_haveData = FALSE; var $debug = FALSE; var $padstr = "\0"; /** * _record * [0], 16 bits: $MB:$ME:$CF:$ID_LENGTH * [1], 16 bits: $TNF:$TYPE_LENGTH, $TNF defaults to DIME_TYPE_NONE * [2], 32 bits: $DATA_LENGTH * [3], ID + PADDING * [4], TYPE + PADDING * [5], DATA + PADDING */ var $_record = array(0,0x8000,0,'','',''); function DIME_Record($debug = FALSE) { $this->debug = $debug; if ($debug) $this->padstr = '*'; } function setMB() { $this->_record[0] |= 0x8000; } function setME() { $this->_record[0] |= 0x4000; } function setCF() { $this->_record[0] |= 0x2000; } function isChunk() { return $this->_record[0] & 0x2000; } function isEnd() { return $this->_record[0] & 0x4000; } function isStart() { return $this->_record[0] & 0x8000; } function getID() { return $this->_record[3]; } function getType() { return $this->_record[4]; } function getData() { return $this->_record[5]; } function getDataLength() { return $this->_record[2]; } function setType($typestring, $type=DIME_TYPE_UNKNOWN) { $typelen = strlen($typestring) & 0x1FFF; // XXX check for overflow of type length $type = $type << 13; $this->_record[1] = $type + $typelen; $this->TYPE_LENGTH = $this->_getPadLength($typelen); $this->_record[4] = $typestring; } function generateID() { $id = md5(time()); $this->setID($id); return $id; } function setID($id) { $idlen = strlen($id) & 0x1FFF; // XXX check for overflow error in idlen $flags = $this->_record[0] & 0x7000; $this->_record[0] = $flags + $idlen; $this->ID_LENGTH = $this->_getPadLength($idlen); $this->_record[3] = $id; } function setData($data, $size=0) { $datalen = $size?$size:strlen($data); $this->_record[2] = $datalen; $this->DATA_LENGTH = $this->_getPadLength($datalen); $this->_record[5] = $data; } function encode() { // create the header if ($this->debug) { // this encoding is NOT DIME! // it's just a bit easier to figure out problems with $format = "%04X%04X%08X". "%".$this->ID_LENGTH."s". "%".$this->TYPE_LENGTH."s". "%".$this->DATA_LENGTH."s"; return sprintf($format, ($this->_record[0]&0x0000FFFF), ($this->_record[1]&0x0000FFFF), $this->_record[2], str_pad($this->_record[3], $this->ID_LENGTH, $this->padstr), str_pad($this->_record[4], $this->TYPE_LENGTH, $this->padstr), str_pad($this->_record[5], $this->DATA_LENGTH, $this->padstr)); } else { // the real dime encoding $format = '%c%c%c%c%c%c%c%c'. '%'.$this->ID_LENGTH.'s'. '%'.$this->TYPE_LENGTH.'s'. '%'.$this->DATA_LENGTH.'s'; return sprintf($format, ($this->_record[0]&0x0000FF00)>>8, ($this->_record[0]&0x000000FF), ($this->_record[1]&0x0000FF00)>>8, ($this->_record[1]&0x000000FF), ($this->_record[2]&0xFF000000)>>24, ($this->_record[2]&0x00FF0000)>>16, ($this->_record[2]&0x0000FF00)>>8, ($this->_record[2]&0x000000FF), str_pad($this->_record[3], $this->ID_LENGTH, $this->padstr), str_pad($this->_record[4], $this->TYPE_LENGTH, $this->padstr), str_pad($this->_record[5], $this->DATA_LENGTH, $this->padstr)); } } function _getPadLength($len) { $pad = 0; if ($len) { $pad = $len % 32; if ($pad) $pad = 32 - $pad; } return $len + $pad; } function decode(&$data) { if ($this->debug) { echo " data length is: ".strlen($data)."\n"; // debug decoding against our own format $this->_record[0] = hexdec(substr($data,0,4)); $this->_record[1] = hexdec(substr($data,4,4)); $this->_record[2] = hexdec(substr($data,8,8)); $p = 16; } else { // REAL DIME decoding $this->_record[0] = (hexdec(bin2hex($data[0]))<<8) + hexdec(bin2hex($data[1])); $this->_record[1] = (hexdec(bin2hex($data[2]))<<8) + hexdec(bin2hex($data[3])); $this->_record[2] = (hexdec(bin2hex($data[4]))<<24) + (hexdec(bin2hex($data[5]))<<16) + (hexdec(bin2hex($data[6]))<<8) + hexdec(bin2hex($data[7])); $p = 8; } $this->id_len = $this->_record[0] & 0x1FFF; $this->ID_LENGTH = $this->_getPadLength($this->id_len); $this->type_len = $this->_record[1] & 0x1FFF; $this->TYPE_LENGTH = $this->_getPadLength($this->type_len); $this->DATA_LENGTH = $this->_getPadLength($this->_record[2]); if ($this->debug) { echo " idlen: $this->id_len bytes padded: $this->ID_LENGTH\n"; echo " typelen: $this->type_len bytes padded: $this->TYPE_LENGTH\n"; echo " datalen: {$this->_record[2]} bytes padded: $this->DATA_LENGTH\n"; } $datalen = strlen($data); $this->_record[3] = substr($data,$p,$this->id_len); $this->_haveID = (strlen($this->_record[3]) == $this->id_len); if ($this->_haveID) { $p += $this->ID_LENGTH; $this->_record[4] = substr($data,$p,$this->type_len); $this->_haveType = (strlen($this->_record[4]) == $this->type_len); if ($this->_haveType) { $p += $this->TYPE_LENGTH; $this->_record[5] = substr($data,$p,$this->_record[2]); $this->_haveData = (strlen($this->_record[5]) == $this->_record[2]); if ($this->_haveData) { $p += $this->DATA_LENGTH; } else { $p += strlen($this->_record[5]); } } else { $p += strlen($this->_record[4]); } } else { $p += strlen($this->_record[3]); } return substr($data, $p); } function addData(&$data) { $datalen = strlen($data); $p = 0; if (!$this->_haveID) { $have = strlen($this->_record[3]); $this->_record[3] .= substr($data,$p,$this->id_len-$have); $this->_haveID = (strlen($this->_record[3]) == $this->id_len); if (!$this->_haveID) return NULL; $p += $this->ID_LENGTH-$have; } if (!$this->_haveType && $p < $datalen) { $have = strlen($this->_record[4]); $this->_record[4] .= substr($data,$p,$this->type_len-$have); $this->_haveType = (strlen($this->_record[4]) == $this->type_len); if (!$this->_haveType) return NULL; $p += $this->TYPE_LENGTH-$have; } if (!$this->_haveData && $p < $datalen) { $have = strlen($this->_record[5]); $this->_record[5] .= substr($data,$p,$this->_record[2]-$have); $this->_haveData = (strlen($this->_record[5]) == $this->_record[2]); if (!$this->_haveData) return NULL; $p += $this->DATA_LENGTH-$have; } return substr($data,$p); } } class DIME_Message extends PEAR { var $record_size = 4096; #var $records =array(); var $parts = array(); var $currentPart = -1; var $stream = NULL; var $_currentRecord; var $_proc = array(); var $type; var $typestr; var $mb = 1; var $me = 0; var $cf = 0; var $id = NULL; var $debug = FALSE; /** * constructor * * this currently takes a file pointer as provided * by fopen * * TODO: integrate with the php streams stuff */ function DIME_Message($stream, $record_size = 4096, $debug = FALSE) { $this->stream = $stream; $this->record_size = $record_size; $this->debug = $debug; } function _sendRecord(&$data, $typestr='', $id=NULL, $type=DIME_TYPE_UNKNOWN) { $record = new DIME_Record($this->debug); if ($this->mb) { $record->setMB(); // all subsequent records are not message begin! $this->mb = 0; } if ($this->me) $record->setME(); if ($this->cf) $record->setCF(); $record->setData($data); $record->setType($typestr,$type); #if ($this->debug) { # print str_replace('\0','*',$record->encode()); #} return fwrite($this->stream, $record->encode()); } function startChunk(&$data, $typestr='', $id=NULL, $type=DIME_TYPE_UNKNOWN) { $this->me = 0; $this->cf = 1; $this->type = $type; $this->typestr = $typestr; if ($id) { $this->id = $id; } else { $this->id = md5(time()); } $this->_sendRecord($data, $this->typestr, $this->id, $this->type); } function doChunk(&$data) { $this->me = 0; $this->cf = 1; $this->_sendRecord($data, NULL, NULL, DIME_TYPE_UNCHANGED); } function endChunk() { $this->cf = 0; $data = NULL; $this->_sendRecord($data, NULL, NULL, DIME_TYPE_UNCHANGED); $this->id = 0; $this->cf = 0; $this->id = 0; $this->type = DIME_TYPE_UNKNOWN; $this->typestr = NULL; } function endMessage() { $this->me = 1; $data = NULL; $this->_sendRecord($data, NULL, NULL, DIME_TYPE_NONE); $this->me = 0; $this->mb = 1; $this->id = 0; } /** * sendRecord * * given a chunk of data, it creates DIME records * and writes them to the stream * */ function sendData(&$data, $typestr='', $id=NULL, $type=DIME_TYPE_UNKNOWN) { $len = strlen($data); if ($len > $this->record_size) { $chunk = substr($data, 0, $this->record_size); $p = $this->record_size; $this->startChunk($chunk,$typestr,$id,$type); while ($p < $len) { $chunk = substr($data, $p, $this->record_size); $p += $this->record_size; $this->doChunk($chunk); } $this->endChunk(); return; } $this->_sendRecord($data, $typestr,$id,$type); } /** * sendFile * * given a filename, it reads the file, * creates records and writes them to the stream * */ function sendFile($filename, $typestr='', $id=NULL, $type=DIME_TYPE_UNKNOWN) { $f = fopen($filename, "rb"); if ($f) { if ($data = fread($f, $this->record_size)) { $this->startChunk($data,$typestr,$id,$type); } while ($data = fread($f, $this->record_size)) { $this->doChunk($data,$typestr,$id,$type); } $this->endChunk(); fclose($f); } } /** * _processData * * creates DIME_Records from provided data * */ function _processData(&$data) { $leftover = NULL; if (!$this->_currentRecord) { $this->_currentRecord = new DIME_Record($this->debug); $data = $this->_currentRecord->decode($data); } else { $data = $this->_currentRecord->addData($data); } if ($this->_currentRecord->_haveData) { if ($this->debug) { echo " idlen: ".strlen($this->_currentRecord->_record[3])."\n"; echo " typelen: ".strlen($this->_currentRecord->_record[4])."\n"; echo " datalen: ".strlen($this->_currentRecord->_record[5])."\n"; } if (count($this->parts)==0 && !$this->_currentRecord->isStart()) { // raise an error! return PEAR::raiseError('First Message is not a DIME begin record!'); } if ($this->_currentRecord->isEnd() && $this->_currentRecord->getDataLength()==0) { return NULL; } if ($this->currentPart < 0 && !$this->_currentRecord->isChunk()) { $this->parts[] = array(); $this->currentPart = count($this->parts)-1; $this->parts[$this->currentPart]['id'] = $this->_currentRecord->getID(); $this->parts[$this->currentPart]['type'] = $this->_currentRecord->getType(); $this->parts[$this->currentPart]['data'] = $this->_currentRecord->getData(); $this->currentPart = -1; } else { if ($this->currentPart < 0) { $this->parts[] = array(); $this->currentPart = count($this->parts)-1; $this->parts[$this->currentPart]['id'] = $this->_currentRecord->getID(); $this->parts[$this->currentPart]['type'] = $this->_currentRecord->getType(); $this->parts[$this->currentPart]['data'] = $this->_currentRecord->getData(); } else { $this->parts[$this->currentPart]['data'] .= $this->_currentRecord->getData(); if (!$this->_currentRecord->isChunk()) { // we reached the end of the chunk $this->currentPart = -1; } } } #$this->records[] = $this->_currentRecord; if (!$this->_currentRecord->isEnd()) $this->_currentRecord = NULL; } return NULL; } /** * decodeData * * decodes a DIME encrypted string of data * */ function decodeData(&$data) { while (strlen($data) >= DIME_RECORD_HEADER) { $err = $this->_processData($data); if (PEAR::isError($err)) { return $err; } } } /** * read * * reads the stream and creates * an array of records * * it can accept the start of a previously read buffer * this is usefull in situations where you need to read * headers before discovering that the data is DIME encoded * such as in the case of reading an HTTP response. */ function read($buf=NULL) { while ($data = fread($this->stream, 8192)) { if ($buf) { $data = $buf.$data; $buf = NULL; } if ($this->debug) echo "read: ".strlen($data)." bytes\n"; $err = $this->decodeData($data); if (PEAR::isError($err)) { return $err; } // store any leftover data to be used again // should be < DIME_RECORD_HEADER bytes $buf = $data; } if (!$this->_currentRecord || !$this->_currentRecord->isEnd()) { return PEAR::raiseError('reached stream end without end record'); } return NULL; } } ?> Index: pear/Net_DIME/package.xml +++ pear/Net_DIME/package.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "../package.dtd"> <!-- do not use the "Type" attribute here, that one is only for generated package.xml files --> <package version="1.0"> <name>Net_DIME</name> <summary>The PEAR::Net_DIME class implements DIME encoding</summary> <maintainers> <maintainer> <user>shane</user> <name>Shane Caraveo</name> <email>shane@caraveo.com</email> </maintainer> </maintainers> <release> <version>0.1</version> <date>2002-05-12</date> <notes> This is the initial independent release of the Net_DIME package. Some of the code probably needs to be PEAR-ified a bit more. This needs to be integrated with streams, if there is anything needed to do that. More testing needs to be done, but it encodes/decodes it's own messages. </notes> <filelist> <dir name="/" baseinstalldir="Net"> <file role="php">DIME.php</file> <dir name="test" role="test"> <file role="test" name="dime_message_test.php"/> <file role="test" name="dime_record_test.php"/> </dir> </dir> </filelist> </release> </package> Index: pear/Net_DIME/test/dime_message_test.php +++ pear/Net_DIME/test/dime_message_test.php <?php include 'SOAP/DIME.php'; $test='--=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e----=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- '; $debug = FALSE; $data = NULL; $f = fopen('/tmp/dime.data','wb+'); $dime = new DIME_Message($f,4096,$debug); $dime->sendData($test); #$dime->sendData($test); $dime->endMessage(); $size = ftell($f); print "filesize: $size, datasize: ".strlen($test)."\n"; rewind($f); $dime = new DIME_Message($f,4096,$debug); $err = $dime->read(); if (PEAR::isError($err)) { print $err->getMessage()."\n"; } if (strcmp($dime->parts[0]['data'],$test)==0) { echo "encode/decode success\n"; } else { echo "encode/decode failure\n"; } ?> Index: pear/Net_DIME/test/dime_record_test.php +++ pear/Net_DIME/test/dime_record_test.php <?php include 'SOAP/DIME.php'; $test='--=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Type: text/xml; charset="UTF-8" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <echoMimeAttachment> <test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --=_a2cbb051424cc43e72d3c8c8d0b8f70e Content-Disposition: attachment.php Content-Type: text/plain Content-Transfer-Encoding: base64 Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ --=_a2cbb051424cc43e72d3c8c8d0b8f70e-- '; $data = NULL; $dime = new DIME_Record($data); #$dime->setMB(); $dime->generateID(); $dime->setType('text/plain'); $dime->setData($test); print_r($dime->_record); $enc = $dime->encode(); print bin2hex(substr($enc,0,8))."\n"; print chunk_split(bin2hex(substr($enc,8)),72)."\n"; $dime->decode($enc); print_r($dime->_record); ?>
« previous php.pear.cvs (#3792) next »