[ 
https://issues.apache.org/jira/browse/AXIS2-5971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081530#comment-18081530
 ] 

Robert Lazarski commented on AXIS2-5971:
----------------------------------------

 Deferring to 2.0.2. My previous fix attempt (8d62eb4) broke end-user REST
   behavior (AXIS2-6080) and was reverted (5adf40b). The issue is
  well-understood — processURLRequest() should prefer the Accept header
  over Content-Type for bodiless requests (GET/DELETE) — but the fix
  touches the Builder and MessageFormatter selection pipeline with a large
  blast radius across all REST callers. A correct fix needs test coverage
  for all Content-Type/Accept/null combinations and careful regression
  testing. Too risky for 2.0.1 at this stage; moving fix version to 2.0.2.
  Community patches with test cases welcome.


> AxisServlet.processURLRequest use content-type header instead of accept
> -----------------------------------------------------------------------
>
>                 Key: AXIS2-5971
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5971
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.7.8
>            Reporter: Marti Pamies Sola
>            Assignee: Robert Lazarski
>            Priority: Minor
>             Fix For: 2.0.2
>
>
> Class org.apache.axis2.transport.http.AxisServlet has the following code
> {code:java}
> //         public void processURLRequest() throws IOException, 
> ServletException {
>             try {
>                 RESTUtil.processURLRequest(messageContext, 
> response.getOutputStream(),
>                         request.getContentType());
>                 this.checkResponseWritten();
>             } catch (AxisFault e) {
>                 setResponseState(messageContext, response);
>                 processFault(e);
>             }
>             closeStaxBuilder(messageContext);        }
> {code}
> As fas as I understand, this code is involed when diong REST and recieving an 
> URL request without body. 
> The problem is that this method looks for request.getContentType() instead of 
> request Accept Header to determine to messageFormater to use. This behaviour 
> make content type mandatory for URL client request which has no sense, as it 
> is a header to indicate server response content type.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to