|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Real XML Site
The RFC specifically envisions that a GET request may return generated data rather than just a static document. From the current RFC (2626): "The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process. " Also, the Content-Type header is not mandatory, but has to be used if it is present: "Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. " It's certainly legitimate to return html with an extension of '.xml', if you have the right Content-Type. Now whether a given browser really conforms with this, well, maybe some of them cheat ... Cheers, Tom P Paul Tchistopolskii wrote > However ... when I'm asking GET /some.xml > and I'm receiving *not* xml in return - this looks really > strange... ( now, after Tim said that ;-). > > When I'm asking GET some.txt or GET some.zip or GET some.gif - > I'm receiving the 'corresponding' mimetype ... > ... > But when I'm asking for .asp or for .cgi it is actually OK to return > unpredictable mime-type ... Hmm ... > > ... > URL ( URI ) identifies 'something'. Asking for HTML > ( but requesting some.xml ) looks like weird indetification of > 'something'. Or maybe not. > > ... > > If you see a HTTP request as "execute this service and get me some > > results back", > ... > Aha! I think that this is a 'special' extension/mime-type ;-) I mean that > we can assume that "when it ends with .asp or .cgi" - we are talking to > the service. Service is 'special mime-type'. Void * ;-) > > This means that returning HTML for some.xml is still 'inconsistent'. > It should be not some.xml but some.cgi or some.? >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








