Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#191 closed defect (fixed)

Petascope response mimetype is text/plain

Reported by: mase@… Owned by: msahakyan
Priority: major Milestone: 8.4
Component: petascope Version: 8.3
Keywords: Cc: Jinsongdi Yu, Dimitar Misev, barboni@…
Complexity: Medium

Description

GetCapabilities, DescribeCoverage and GetCoverage (where returning GML Coverage format rather than image format) set the response Content-Type to text/plain rather than application/xml (or other XML mime type).

This means, for example, that an XMLHttpRequest object will have null as the responseXML.

Change History (13)

comment:1 by Dimitar Misev, 12 years ago

Owner: changed from Dimitar Misev to msahakyan
Status: newassigned

Another simple fix needed probably in PetascopeInterface

comment:2 by msahakyan, 12 years ago

Resolution: fixed
Status: assignedclosed

comment:3 by Dimitar Misev, 12 years ago

Cc: Jinsongdi Yu added
Resolution: fixed
Status: closedreopened

Seems like the mime-type of GetCapabilities/DescribeCoverage should be application/xml. What about GetCoverage?

Jinsongdi, please confirm.

comment:4 by Jinsongdi Yu, 12 years ago

It should be application/gml+xml for getCoverage

comment:5 by Dimitar Misev, 12 years ago

Resolution: fixed
Status: reopenedclosed

comment:6 by Piero Campalani, 12 years ago

But this way browsers do not visualize it, and return a file: not so convenient.

Reopening the ticket since the MIME type is anyway not coeherent between GetCoverage (now application/gml+xml) and DescribeCoverage/GetCapabilities (text/xml).

I think we should choose a MIME type which is recognized by the browsers as text.
Would text/xml be wrong for some reason?

comment:7 by Piero Campalani, 12 years ago

Resolution: fixed
Status: closedreopened

comment:8 by Piero Campalani, 12 years ago

Cc: Dimitar Misev barboni@… added

comment:9 by Dimitar Misev, 12 years ago

text/xml is visualized fine for me in firefox?

The GetCoverage must be application/gml+xml according to the standard I guess.

comment:10 by Marcus Sen, 12 years ago

Since originally submitting this ticket I have found quite a bit of inconsistency in different browsers parsing XML responses for which I haven't resolved the reasons. So I don't know how strong an argument about the XMLHttpRequest object I made in the initial ticket is anymore.

However, from a standards point-of-view…

Other OGC standards seem to have changed their ideas on this, they used to have OGC specific mimetypes which people hated I think for the same reason Piero would like text/xml; so it appears in a browser.

(By the way, in Firefox at least if you ask it to open a returned file which has one of these non-standard mimetypes in Firefox itself then it will display them. So it's not such a problem.)

However, text/xml is deprecated (http://lists.w3.org/Archives/Public/www-html/2004Jul/0004.html). I suspect this was a controversial decision as text/xml types are quite convenient but I think the reasoning is to do with the way mail gatways are allowed to handle text encoding of text/* mimetypes. Possibly not so relevant for web apps?

I'm not sure what the best solution is (but not text/plain). Maybe OGC has a general policy on this now? This is really a discussion for the standards group with the software implementing whatever decision they make.

comment:11 by Marcus Sen, 12 years ago

http://tools.ietf.org/html/draft-murata-kohn-lilley-xml-03 is more complete article about deprecating text/xml but it is only a draft so maybe not authoritative and there doesn't seem to be a solution that works well in all cases.

comment:12 by Peter Baumann, 12 years ago

Resolution: fixed
Status: reopenedclosed

comment:13 by Piero Campalani, 12 years ago

If text/xml is deprecated then we should change the MIME type of GetCapabilities and DescribeCoverage responses.

Moving discussion to dev mailing list and coming back with conclusions.

Note: See TracTickets for help on using tickets.