[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Fri Nov 4 17:45:06 UTC 2005


gss
Fri Nov  4 12:45:06 EST 2005
Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet
In directory pub.open-bio.org:/tmp/cvs-serv27186/src/org/semanticmoby/servlet

Modified Files:
	AbstractMobyServlet.java 
Log Message:
When responding to GET or POST, set content type of response to application/RDF+XML

s-moby/ref-impl/core/src/org/semanticmoby/servlet AbstractMobyServlet.java,1.5,1.6
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java	2005/10/31 17:24:54	1.5
+++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java	2005/11/04 17:45:06	1.6
@@ -37,6 +37,7 @@
 
             // Write everything from the reader to the writer
             //
+            response.setContentType("application/rdf+xml");
             PrintWriter writer = response.getWriter();
             String      line;
 
@@ -76,13 +77,11 @@
     protected BufferedReader getFileReader(String fileName) {
 
         try {
-
-            return new BufferedReader(new InputStreamReader(getServletContext()
-                                                                .getResourceAsStream(fileName)));
+            return new BufferedReader(
+                new InputStreamReader(
+                    getServletContext().getResourceAsStream(fileName)));
         } catch (Throwable t) {
-
             t.printStackTrace();
-
             return null;
         }
     }
@@ -134,6 +133,7 @@
 
             // Send the graph back in response
             //
+            response.setContentType("application/rdf+xml");
             resource.serialize(out);
         } catch (Throwable t) {
 




More information about the MOBY-guts mailing list