Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5971

AxisServlet.processURLRequest use content-type header instead of accept

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.7.8
    • None
    • kernel
    • None

    Description

      Class org.apache.axis2.transport.http.AxisServlet has the following code

      //         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);        }
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            martipamies Marti Pamies Sola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: