|
62 | 62 | import jakarta.servlet.http.HttpServlet; |
63 | 63 | import jakarta.servlet.http.HttpServletRequest; |
64 | 64 | import jakarta.servlet.http.HttpServletResponse; |
65 | | -import jakarta.ws.rs.core.HttpHeaders; |
66 | 65 | import javax.xml.namespace.QName; |
67 | 66 | import java.io.BufferedInputStream; |
68 | 67 | import java.io.BufferedOutputStream; |
@@ -902,16 +901,8 @@ public void processXMLRequest() throws IOException, ServletException { |
902 | 901 |
|
903 | 902 | public void processURLRequest() throws IOException, ServletException { |
904 | 903 | try { |
905 | | - // AXIS2-5971, content-type is not present on some |
906 | | - // types of REST requests that have no body and in |
907 | | - // those cases use the 'accept' header if defined |
908 | | - final String accept = request.getHeader(HttpHeaders.ACCEPT); |
909 | | - final String contentType = request.getContentType(); |
910 | | - if (contentType == null && accept != null) { |
911 | | - RESTUtil.processURLRequest(messageContext, response.getOutputStream(), accept); |
912 | | - } else { |
913 | | - RESTUtil.processURLRequest(messageContext, response.getOutputStream(), contentType); |
914 | | - } |
| 904 | + RESTUtil.processURLRequest(messageContext, response.getOutputStream(), |
| 905 | + request.getContentType()); |
915 | 906 | this.checkResponseWritten(); |
916 | 907 | } catch (AxisFault e) { |
917 | 908 | setResponseState(messageContext, response); |
|
0 commit comments