You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Dan Diephouse <da...@envoisolutions.com> on 2007/01/04 21:34:37 UTC
HttpURLConncetion JDK bug with HTTP DELETE?
I'm thinking I might have found a bug with the HttpURLConnection class while
doing an HTTP DELETE. When getResponseCode() is called on the connection I
get this:
Caused by: java.net.ProtocolException: HTTP method DELETE doesn't support
output
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(
HttpURLConnection.java:851)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(
HttpURLConnection.java:920)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java
:367)
at org.apache.cxf.transport.http.HTTPConduit.getResponseCode(
HTTPConduit.java:369)
at org.apache.cxf.transport.http.HTTPConduit.access$0(HTTPConduit.java
:365)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
(HTTPConduit.java:466)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doClose
(HTTPConduit.java:457)
at org.apache.cxf.io.AbstractCachedOutputStream.close(
AbstractCachedOutputStream.java:113)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:257)
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(
MessageSenderInterceptor.java:58)
... 23 more
Why in the world getInputStream is calling getOutputStream I have NFI. I've
also tried setting doOutput(false), but then I just get an exception saying
I need to set doOutput(true) for getOutputStream to work!
Anyone have any clue what the key to getting DELETE to work is??
- Dan
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog