Bug #720
Metacat MN services not setting content-type in response
100%
Description
The content-type in the response headers from Metacat is being set to "text/plain" when the output format is XML. The response header content-type should be set to the correct value to assist client interpretation of the output.
e.g.:
curl -v -H "Accept: text/xml" "http://knb-mn.ecoinformatics.org/knb/object?count=1"
* About to connect() to knb-mn.ecoinformatics.org port 80 (#0)
* Trying 128.111.220.87... connected
* Connected to knb-mn.ecoinformatics.org (128.111.220.87) port 80 (#0)
GET /knb/object?count=1 HTTP/1.1
User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
Host: knb-mn.ecoinformatics.org
Accept: text/xml< HTTP/1.1 200 OK
< Date: Sat, 24 Jul 2010 15:43:26 GMT
< Server: Apache/2.2.14 (Ubuntu)
< Set-Cookie: JSESSIONID=74779408FE9F8FF418146C54951EBCE5; Path=/knb
< Content-Length: 488
< Content-Type: text/plain
<
* Connection #0 to host knb-mn.ecoinformatics.org left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8"?>knb:testid:20102055213803eml://ecoinformatics.org/eml-2.1.04d6537f48d2967725bfcc7a9f0d5094ce4088e0975fcd3f1a361f15f46e49f832010-07-24T18:56:57.371Z12/d1:objectList
History
#1 Updated by Chad Berkley over 14 years ago
- Status changed from New to Closed
content type is now set to text/xml