You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wh...@apache.org on 2005/06/30 13:19:02 UTC

cvs commit: ws-axis/c/tests/auto_build/testcases/output Attachment1Request.out DynUnrefAttachmentTestRequest.out DynamicAttachmentRequest.out

whitlock    2005/06/30 04:19:02

  Modified:    c/src/soap SoapAttachment.cpp SoapAttachmentHeaders.cpp
                        SoapSerializer.cpp
               c/tests/auto_build/testcases/output Attachment1Request.out
                        DynUnrefAttachmentTestRequest.out
                        DynamicAttachmentRequest.out
  Log:
  Make lines in a MIME/HTTP message terminate with a \r\n instead of just a \n. This is required as is part of the HTTP protocol.
  
  Revision  Changes    Path
  1.19      +6 -6      ws-axis/c/src/soap/SoapAttachment.cpp
  
  Index: SoapAttachment.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- SoapAttachment.cpp	27 Jun 2005 13:51:52 -0000	1.18
  +++ SoapAttachment.cpp	30 Jun 2005 11:19:01 -0000	1.19
  @@ -94,20 +94,20 @@
   void SoapAttachment::serialize(SoapSerializer &pSZ)
   {
   	/* Serialize the Attachment Headers */
  -	pSZ.serialize("\n", NULL);
  +	pSZ.serialize("\r\n", NULL);
   	m_AttachmentHeaders->serialize(pSZ);
   
   	/* Serialize the Attachment Body */
       if (iEncodingStyle == AXIS_BASE64)
       {
   	    if (m_AttachmentBody) {
  -		    pSZ.serialize("\n", NULL);
  +		    pSZ.serialize("\r\n", NULL);
   		    pSZ.serializeAsChardata(m_AttachmentBody, XSD_BASE64BINARY);
   	    }
       } 
       else if (iEncodingStyle == AXIS_BINARY)
       {
  -        pSZ.serialize("\n", NULL);
  +        pSZ.serialize("\r\n", NULL);
           
           
           string attachBody = m_binaryBody;
  @@ -125,7 +125,7 @@
           pSZ.serialize(m_binaryBody, NULL);
       }
   
  -	pSZ.serialize("\n", NULL);
  +	pSZ.serialize("\r\n", NULL);
   }
   
   xsd__base64Binary* SoapAttachment::getBody()
  @@ -163,11 +163,11 @@
   	list<Attribute*>::iterator it = m_attributes.begin();
   	while (it != m_attributes.end())
   	{
  -		pSZ.serialize("\n  ",NULL);
  +		pSZ.serialize("\r\n  ",NULL);
   		(*it)->serialize(pSZ);
   		it++;
   	}
  -	pSZ.serialize("/>\n",NULL);
  +	pSZ.serialize("/>\r\n",NULL);
   }
   
   void SoapAttachment::addAttributes(IAttribute **attributes, int nAttributes)
  
  
  
  1.4       +2 -2      ws-axis/c/src/soap/SoapAttachmentHeaders.cpp
  
  Index: SoapAttachmentHeaders.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachmentHeaders.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SoapAttachmentHeaders.cpp	23 Jun 2005 12:18:24 -0000	1.3
  +++ SoapAttachmentHeaders.cpp	30 Jun 2005 11:19:01 -0000	1.4
  @@ -70,10 +70,10 @@
   	    if (m_AttachHeaders[i].first == AXIS_CONTENT_ID)
   	    {
   			pSZ.serialize((m_AttachHeaders[i].first).c_str(), ": <", NULL);
  -			pSZ.serialize((m_AttachHeaders[i].second).c_str(), ">\n", NULL);
  +			pSZ.serialize((m_AttachHeaders[i].second).c_str(), ">\r\n", NULL);
   		} else {
   			pSZ.serialize((m_AttachHeaders[i].first).c_str(), ": ", NULL);
  -			pSZ.serialize((m_AttachHeaders[i].second).c_str(), "\n", NULL); 
  +			pSZ.serialize((m_AttachHeaders[i].second).c_str(), "\r\n", NULL); 
   		}
   	}
   }
  
  
  
  1.130     +8 -8      ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- SoapSerializer.cpp	22 Jun 2005 15:45:38 -0000	1.129
  +++ SoapSerializer.cpp	30 Jun 2005 11:19:01 -0000	1.130
  @@ -321,8 +321,8 @@
   
   					pStream->setTransportProperty( CONTENT_TYPE, (*asContentType).c_str()); 
   
  -					serialize( "\n" MIMEBOUNDARY "\n", NULL);
  -					serialize( pStream->getIncomingSOAPMimeHeaders(), "\n\n", NULL);
  +					serialize( "\r\n" MIMEBOUNDARY "\r\n", NULL);
  +					serialize( pStream->getIncomingSOAPMimeHeaders(), "\r\n\r\n", NULL);
   				}
   				else
   				{	// Client code
  @@ -334,14 +334,14 @@
   					ctype += ">\"";
   					pStream->setTransportProperty( AXIS_CONTENT_TYPE, ctype.c_str());
   
  -					serialize("\n--" MIMEBOUNDARY "\n", NULL);
  -                    serialize(AXIS_CONTENT_TYPE ": text/xml; charset=UTF-8\n", NULL);
  -                    serialize(AXIS_CONTENT_TRANSFER_ENCODING ": binary\n", NULL);
  +					serialize("\r\n--" MIMEBOUNDARY "\r\n", NULL);
  +                    serialize(AXIS_CONTENT_TYPE ": text/xml; charset=UTF-8\r\n", NULL);
  +                    serialize(AXIS_CONTENT_TRANSFER_ENCODING ": binary\r\n", NULL);
   
   					string cid = AXIS_CONTENT_ID;
   					cid += ": <";
   					cid += id;
  -					cid += ">\n\n";		// Extra \n terminates headers
  +					cid += ">\r\n\r\n";		// Extra \r\n terminates headers
                       serialize(cid.c_str(), NULL);
   				}
   			}
  @@ -1145,12 +1145,12 @@
   		SoapAttachment *att = ((SoapAttachment *) ((*itCurrAttach).second));
   		if (NULL != att->getBody())
   		{
  -			serialize( "\n--" MIMEBOUNDARY, NULL);
  +			serialize( "\r\n--" MIMEBOUNDARY, NULL);
   			att->serialize(pSZ);
   		}
           itCurrAttach++;
       }
  -	pSZ.serialize("\n--" MIMEBOUNDARY "--\n", NULL);
  +	pSZ.serialize("\r\n--" MIMEBOUNDARY "--\r\n", NULL);
   }
   
   void SoapSerializer::addAttachment( const AxisChar * achId, ISoapAttachment * pAttach)
  
  
  
  1.2       +1 -1      ws-axis/c/tests/auto_build/testcases/output/Attachment1Request.out
  
  Index: Attachment1Request.out
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/Attachment1Request.out,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Attachment1Request.out	23 Jun 2005 12:18:24 -0000	1.1
  +++ Attachment1Request.out	30 Jun 2005 11:19:02 -0000	1.2
  @@ -2,7 +2,7 @@
   Host: localhost:13260
   SOAPAction: ""
   Content-Type: multipart/related; type="text/xml"; boundary="------=MIME_BOUNDARY"; start="<8>"
  -Content-Length: 1964
  +Content-Length: 2036
   
   
   --------=MIME_BOUNDARY
  
  
  
  1.3       +1 -1      ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTestRequest.out
  
  Index: DynUnrefAttachmentTestRequest.out
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTestRequest.out,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynUnrefAttachmentTestRequest.out	16 Jun 2005 15:59:44 -0000	1.2
  +++ DynUnrefAttachmentTestRequest.out	30 Jun 2005 11:19:02 -0000	1.3
  @@ -2,7 +2,7 @@
   Host: localhost:13260
   SOAPAction: "Trash"
   Content-Type: multipart/related; type="text/xml"; boundary="------=MIME_BOUNDARY"; start="<6>"
  -Content-Length: 1409
  +Content-Length: 1452
   
   
   --------=MIME_BOUNDARY
  
  
  
  1.5       +1 -1      ws-axis/c/tests/auto_build/testcases/output/DynamicAttachmentRequest.out
  
  Index: DynamicAttachmentRequest.out
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/DynamicAttachmentRequest.out,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DynamicAttachmentRequest.out	21 Jun 2005 15:45:26 -0000	1.4
  +++ DynamicAttachmentRequest.out	30 Jun 2005 11:19:02 -0000	1.5
  @@ -2,7 +2,7 @@
   Host: localhost:13260
   SOAPAction: "Trash"
   Content-Type: multipart/related; type="text/xml"; boundary="------=MIME_BOUNDARY"; start="<5>"
  -Content-Length: 1402
  +Content-Length: 1443
   
   
   --------=MIME_BOUNDARY