This patch looks really ugly. What do you want to return for "text/xml"? (For the OWL-API it should be plain text.) In any case is should not depend on a trailing semicolon!

The second header part is supposed to literally match the "observed" OWL-API header containing text/html, that I haven't observed yet. It is very fragile to any changes (like the order of file types or interspersed accept parameters like ie. "q=0.5" following ";" ). 

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

I think the OWL-API just uses the  java URL connection, therefore ontohub must be able to properly serve ordinary java requests (that maybe different for different clients!).