<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks, David.<br>
<br>
We'll fix it.<br>
<br>
Donald<br>
<br>
Dave Vieglais wrote:
<blockquote
 cite="mid:da8fa67d0711081342wf1c8569yb0d9728ddb87208d@mail.gmail.com"
 type="cite">Hi Kevin,<br>
you're good:<br>
  <br>
---<br>
  <span style="font-family: courier new,monospace;">python
responsetests.py -v 20 -p "<a moz-do-not-send="true"
 href="http://lsid.herbimi.info/TapirDotNET/tapir.aspx/herbIMI?op=inventory&amp;count=true&amp;concept=http://rs.tdwg.org/ontology/voc/TaxonOccurrence#/rdf:RDF/to:TaxonOccurrence/to:collector">
http://lsid.herbimi.info/TapirDotNET/tapir.aspx/herbIMI?op=inventory&amp;count=true&amp;concept=http://rs.tdwg.org/ontology/voc/TaxonOccurrence#/rdf:RDF/to:TaxonOccurrence/to:collector</a>"</span><br
 style="font-family: courier new,monospace;">
  <br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Testing: <a
 moz-do-not-send="true"
 href="http://lsid.herbimi.info/TapirDotNET/tapir.aspx/herbIMI?op=inventory&amp;count=true&amp;concept=http://rs.tdwg.org/ontology/voc/TaxonOccurrence#/rdf:RDF/to:TaxonOccurrence/to:collector">
http://lsid.herbimi.info/TapirDotNET/tapir.aspx/herbIMI?op=inventory&amp;count=true&amp;concept=http://rs.tdwg.org/ontology/voc/TaxonOccurrence#/rdf:RDF/to:TaxonOccurrence/to:collector</a></span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] content-length: 12019</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] x-powered-by: <a moz-do-not-send="true" href="http://ASP.NET">ASP.NET</a></span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] set-cookie: ASP.NET_SessionId=uxfg0l55colhnjmxzinwxp55; path=/;
HttpOnly
  </span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] x-aspnet-version: 2.0.50727</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] server: Microsoft-IIS/6.0</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] connection: close</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] pragma: no-cache:</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] cache-control: private
  </span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] date: Thu, 08 Nov 2007 21:29:37 GMT</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] content-type: text/xml; charset="utf-8"</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">== Results ==</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "HTTP Status"
[OK]: No Worries</span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "Response
Encoding" [OK]: No Worries
  </span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "Document
Encoding" [OK]: No Worries</span><br>
  <br>
---<br>
  <br>
The GBIF rest service doesn't do quite so well though:
  <br>
  <br>
---<br>
  <span style="font-family: courier new,monospace;">python
responsetests.py -v 20 -p "<a moz-do-not-send="true"
 href="http://newportal.gbif.org/ws/rest/provider/list?stylesheet=&amp;maxresults=10">http://newportal.gbif.org/ws/rest/provider/list?stylesheet=&amp;maxresults=10
  </a>"</span><br style="font-family: courier new,monospace;">
  <br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Testing: <a
 moz-do-not-send="true"
 href="http://newportal.gbif.org/ws/rest/provider/list?stylesheet=&amp;maxresults=10">
http://newportal.gbif.org/ws/rest/provider/list?stylesheet=&amp;maxresults=10</a></span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] date: Thu, 08 Nov 2007 21:37:01 GMT
  </span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] transfer-encoding: chunked</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] connection: close</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] content-type: text/xml</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">INFO:root:[HTTP
HEADER] server: Apache/2.0.52 (Red Hat)</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">== Results ==
  </span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "HTTP Status"
[OK]: No Worries</span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "Response
Encoding" [WARNING]: No character encoding was specified for the
text/[*+]xml content type | "Content-type: text/xml"</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "Response
Encoding" [WARNING]: Falling back to the RFC 3023 default of us-ascii
character encoding.</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">Test: "Document
Encoding" [ERROR]: Bozo exception. | Document declared as us-ascii, but
parsed as utf-8
  </span><br style="font-family: courier new,monospace;">
  <br>
---<br>
  <br>
These tests (plus a whole bunch more) will be available as an online
service real soon, with the intent being to help data providers test
their service fairly rigorously before&nbsp; exposing them to the real
world. <br>
  <br>
regards,<br>
&nbsp;Dave V.<br>
  <br>
  <br>
On Nov 8, 2007 1:46 PM, Kevin Richards &lt;<a moz-do-not-send="true"
 href="mailto:RichardsK@landcareresearch.co.nz">RichardsK@landcareresearch.co.nz</a>&gt;
wrote:<br>
&gt; &nbsp;<br>
&gt; &nbsp;<br>
&gt; Good spotting Dave. <br>
&gt; &nbsp; <br>
&gt; This is fixed now in the TapirDotNET implementation of Tapir. <br>
&gt; I have updated the HerbIMI TapirDotNET implementation at<br>
&gt; <a moz-do-not-send="true"
 href="http://lsid.herbimi.info/TapirDotNET/tapir.aspx/herbIMI">
http://lsid.herbimi.info/TapirDotNET/tapir.aspx/herbIMI</a> <br>
&gt; So if you could like to check this provider, I would be interested
in your<br>
&gt; results. <br>
&gt; &nbsp; <br>
&gt; Kevin<br>
&gt; <br>
&gt; &gt;&gt;&gt; "Dave Vieglais" &lt;
  <a moz-do-not-send="true" href="mailto:vieglais@ku.edu">vieglais@ku.edu</a>&gt;
9/11/2007 7:59 a.m. &gt;&gt;&gt;<br>
&gt; &nbsp;<br>
&gt; <br>
&gt; Hi Everyone,<br>
&gt; I've come across a minor issue with some existing TAPIR
installations<br>
&gt; that should be easily fixed and will likely save some frustrations
  <br>
&gt; down the road.<br>
&gt; <br>
&gt; The TAPIR spec<br>
&gt; (<a moz-do-not-send="true"
 href="http://www.tdwg.org/dav/subgroups/tapir/1.0/docs/TAPIRSpecification_2007-07-18.html#toc16">http://www.tdwg.org/dav/subgroups/tapir/1.0/docs/TAPIRSpecification_2007-07-18.html#toc16
  </a>)<br>
&gt; indicates a response Content-type of "text/xml". &nbsp;RFC 3023<br>
&gt; (<a moz-do-not-send="true"
 href="http://www.ietf.org/rfc/rfc3023.txt">http://www.ietf.org/rfc/rfc3023.txt</a>)
indicates that in this case,<br>
&gt; when no "charset" parameter is specified in the HTTP response
header,
  <br>
&gt; the implied character encoding of the response document is
"us-ascii"<br>
&gt; (see s8.5).<br>
&gt; <br>
&gt; so for example:<br>
&gt; <br>
&gt; Good:<br>
&gt; &nbsp; response header = &nbsp;Content-type: text/xml; charset="utf-8"
  <br>
&gt; <br>
&gt; &nbsp; response document signature = &nbsp;&lt;?xml version="1.0"
encoding="utf-8"?&gt;<br>
&gt; <br>
&gt; result = document is assumed to be UTF-8<br>
&gt; <br>
&gt; Not so good:<br>
&gt; &nbsp; response header = &nbsp;Content-type: text/xml
  <br>
&gt; <br>
&gt; &nbsp; response document signature = &nbsp;&lt;?xml version="1.0"
encoding="utf-8"?&gt;<br>
&gt; <br>
&gt; result = document is assumed to be us-ascii<br>
&gt; <br>
&gt; <br>
&gt; All TAPIR installations that I've examined so far do not set a
charset
  <br>
&gt; value, and hence the character encoding of "us-ascii" is assumed by<br>
&gt; the consumer application, which is likely to cause some issues for<br>
&gt; consumer applications. &nbsp;This was also a significant issue for
DiGIR
  <br>
&gt; provider installations.<br>
&gt; <br>
&gt; The solution is likely to be quite simple, and there seems to be
two<br>
&gt; basic options:<br>
&gt; <br>
&gt; 1. Configure the webserver / application to insert a charset value
of
  <br>
&gt; "UTF-8" to avoid the consumer falling back to the default of
us-ascii.<br>
&gt; <br>
&gt; or<br>
&gt; <br>
&gt; 2. Return a Content-type of "Application/xml" or one of its
subtypes.<br>
&gt; In this case RFC 3023 indicates the default character encoding
should
  <br>
&gt; be assumed to be UTF-8.<br>
&gt; <br>
&gt; Note that simply specifying the content type does not automatically<br>
&gt; make the response properly encoded - it is still up to the web<br>
&gt; application (TAPIR in this case) to ensure that the output stream
is
  <br>
&gt; actually UTF-8 encoded.<br>
&gt; <br>
&gt; regards,<br>
&gt; &nbsp; Dave V.<br>
&gt; _______________________________________________<br>
&gt; tdwg-tapir mailing list<br>
&gt; <a moz-do-not-send="true" href="mailto:tdwg-tapir@lists.tdwg.org">tdwg-tapir@lists.tdwg.org
  </a><br>
&gt; <a moz-do-not-send="true"
 href="http://lists.tdwg.org/mailman/listinfo/tdwg-tapir">http://lists.tdwg.org/mailman/listinfo/tdwg-tapir</a><br>
&gt; <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
tdwg-tapir mailing list
<a class="moz-txt-link-abbreviated" href="mailto:tdwg-tapir@lists.tdwg.org">tdwg-tapir@lists.tdwg.org</a>
<a class="moz-txt-link-freetext" href="http://lists.tdwg.org/mailman/listinfo/tdwg-tapir">http://lists.tdwg.org/mailman/listinfo/tdwg-tapir</a>
  </pre>
</blockquote>
</body>
</html>