[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Binary XML

  • From: Michael Brennan <Michael_Brennan@a...>
  • To: 'Stuart Naylor' <indtec@e...>
  • Date: Thu, 26 Jul 2001 14:27:05 -0700

translate binary xml
I hit "send" too quickly. Two other points worth mentioning:

When I said it's legal for intermediaries to alter text content, I should
clarify that there are rules around that. Basically, the intermediary can
alter white space (e.g. wrap long lines, translate line feeds, change the
character encoding, etc.). If binary content is misidentified as a text
media type, or not identified at all and mistakenly interpreted as text,
then the binary data can be corrupted due to this.

Since intermediaries are not supposed to interpret or alter binary types,
you can use the media type of "application/xml" rather than "text/xml" for
XML payloads, and the rules that apply to intermediaries are different. An
intermediary is supposed to treat "application/xml" as binary data, which
means it should not alter white space, change the character encoding,
translate line feeds, or anything else that means changing any of the bytes
on the wire. So when maintaining document content byte-for-byte is
important, you should always use an "application/*" media type, not a
"text/*" media type.

> -----Original Message-----
> From: Michael Brennan 
> Sent: Thursday, July 26, 2001 2:21 PM
> To: 'Stuart Naylor'; Michael Brennan
> Cc: xml-dev@l...
> Subject: RE: Binary XML
> 
> 
> I'm not aware of any limitation sending binary content 
> through port 80. I've done it plenty of times without 
> problems. I would imagine, though, that an HTTP request (or 
> response) that fails to properly identify it's media type 
> might be mangled by an intermediary. Perhaps someone with 
> deeper protocol understanding than myself might wish to 
> comment, though.
> 
> HTTP is MIME-like in that it supports a number of standard 
> MIME headers (and a few of its own). No special MIME wrapper 
> is needed. Just specify the appropriate Content-Type header. 
> Intermediaries are free to interpret and alter text content 
> (e.g. Content-Type: text/xml), but are in violation of the 
> spec if they interpret or alter non-text content (e.g. 
> Content-Type: application/zip). Also, you can employ binary 
> compression so long as you properly identify the protocol 
> used via the Content-Encoding header. (It's also legal to use 
> Content-Transfer-Encoding for this, but I think 
> Content-Encoding has broader support in applications, at 
> present. Both IE and Netscape, for instance, will properly 
> recognize gzip-compressed data if the HTTP message includes 
> "Content-Encoding: gzip".)
> 
> You can also use MIME multipart formats to transmit multiple 
> documents over HTTP in one message. This is another area, 
> though, where you run the risk of being incompatible with 
> other tools. However, in the XML messaging world, the SOAP w/ 
> Attachments spec and ebXML have given some momentum to use of 
> multipart/related wrappers over HTTP, so the level of support 
> for this is rapidly increasing.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.