You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by Raido Kuli <ra...@gmail.com> on 2010/02/19 10:39:27 UTC

HTTP 500 when proxied host offline

http://localhost:8080/wookie/proxy?instanceid_key=r4qHkG2DBq52W.sl.ydwimw78ALIYI.eq.&url=http://somehost/somefile.xml

Tomcat gives HTTP 500 Internal server error, when host what proxy is
looking for is offline.

exception

javax.servlet.ServletException: java.net.ConnectException: Connection
refused: connect
	org.apache.wookie.proxy.ProxyServlet.dealWithRequest(ProxyServlet.java:115)
	org.apache.wookie.proxy.ProxyServlet.doGet(ProxyServlet.java:61)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.wookie.server.CharSetFilter.doFilter(CharSetFilter.java:34)
	org.apache.wookie.server.MainFilter.doFilter(MainFilter.java:42)


I wanted to make my widget handle AJAX errors for offline host and so
on. So, my point here is that it would be nice if proxy responded back
with some XML -> <error>Connection refused</error> or something, like
it does when host is not in whitelist and with some other HTTP status
code (502 or 503). Then it would be easier to implement Widget error
handling for host offline/connection refused response.