[Yanel-commits] rev 29960 -
public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf
michi at wyona.com
michi at wyona.com
Mon Dec 17 22:41:23 CET 2007
Author: michi
Date: 2007-12-17 22:41:23 +0100 (Mon, 17 Dec 2007)
New Revision: 29960
Modified:
public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
Log:
mime type workaround and log level fixed
Modified: public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java 2007-12-17 21:26:31 UTC (rev 29959)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java 2007-12-17 21:41:23 UTC (rev 29960)
@@ -49,15 +49,18 @@
}
/**
- *
+ * Get mime type
*/
public String getMimeType(String viewId) {
if (viewId != null && viewId.equals("source")) {
return "application/xml";
} else if (viewId != null && viewId.equals("rdf+xml")) {
- return "application/rdf+xml";
+ // TODO: Firefox somehow changes application/rdf+xml into application/vnd.mozilla.xul+xml
+ return "application/xml";
+ //return "application/rdf+xml";
} else if (getPath().endsWith(".rdf")) {
- return "application/rdf+xml";
+ return "application/xml";
+ //return "application/rdf+xml";
} else if (viewId != null && viewId.equals("atom")) {
return "application/atom+xml";
} else if (getPath().startsWith("/feeds/people")) {
@@ -303,7 +306,7 @@
} else if (path.startsWith("/feeds/people")) {
path = "/profiles" + path.substring(path.lastIndexOf("/")) + ".rdf";
}
- log.error("DEBUG: getPath(): " + getPath() + ", path: " + path);
+ if (log.isDebugEnabled()) log.debug("getPath(): " + getPath() + ", path: " + path);
return path;
}
More information about the Yanel-commits
mailing list