hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-317) HTTP Client doesn't support multipart/related content-type
Date Wed, 07 Nov 2007 00:03:50 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540630
] 

Michael Vorburger commented on HTTPCLIENT-317:
----------------------------------------------

This does the trick for me reg. problem 2 above... not sure this is fully sufficient? Might
help somebody else. Regards, Michael Vorburger.

class MultipartRelatedRequestEntity extends MultipartRequestEntity {

		public MultipartRelatedRequestEntity(Part[] parts, HttpMethodParams params) {
			super(parts, params);
		}

		public String getContentType()
		{
			String header = super.getContentType();
			int ix = header.indexOf( "boundary" );
			String mimeType = "application/soap+xml"; // or "text/xml\", or doesn't actually matter?

			return "multipart/related; type=\"" + mimeType + "\"; start=\"" + ROOTPART_NAME + "\";
"  + header.substring( ix );
		}
	}


> HTTP Client doesn't support multipart/related content-type
> ----------------------------------------------------------
>
>                 Key: HTTPCLIENT-317
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-317
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 2.0 Final
>         Environment: Operating System: Windows XP
> Platform: PC
>            Reporter: peter
>            Priority: Minor
>             Fix For: 4.0 Final
>
>
> It is not possible to sent data easely as a multipart/related content-type (as 
> discribed in rfc 2387) using Http Client.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message