The server might be returning 404 + HTML and this needs to be handled properly.
JCR-4184 migrate from org.mortbay.jetty to org.eclipse.jetty