Skip to content

Commit 5adf40b

Browse files
Revert "AXIS2-5971 AxisServlet.processURLRequest uses content-type header instead of accept"
This reverts commit 8d62eb4.
1 parent e5290cd commit 5adf40b

File tree

1 file changed

+2
-11
lines changed
  • modules/transport/http/src/main/java/org/apache/axis2/transport/http

1 file changed

+2
-11
lines changed

modules/transport/http/src/main/java/org/apache/axis2/transport/http/AxisServlet.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import jakarta.servlet.http.HttpServlet;
6363
import jakarta.servlet.http.HttpServletRequest;
6464
import jakarta.servlet.http.HttpServletResponse;
65-
import jakarta.ws.rs.core.HttpHeaders;
6665
import javax.xml.namespace.QName;
6766
import java.io.BufferedInputStream;
6867
import java.io.BufferedOutputStream;
@@ -902,16 +901,8 @@ public void processXMLRequest() throws IOException, ServletException {
902901

903902
public void processURLRequest() throws IOException, ServletException {
904903
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());
915906
this.checkResponseWritten();
916907
} catch (AxisFault e) {
917908
setResponseState(messageContext, response);

0 commit comments

Comments
 (0)