Title: Wrong content type for ?wsdl - mod_axis2.cpp always sets text/html on GET

After some patching, I'm able to get axis 1.5 to send out wsdl from the wsdls directory.  Only problem is it sends it out as content type "text/html", so Firefox tries to display it as HTML (interestingly, IE does not).

Anyway, the culprit (I think) is this code snippet from src/server/apache2/mod_axis2.cpp:

    /* for SOAP 1.2 this this should be "application/soap+xml" but keep this for
     * the moment. */
    req_rec->content_type = (M_POST == req_rec->method_number) ?
                "text/xml" : "text/html";

Looks like if the caller does a POST operation, axis sets the conten type to xml, otherwise sets it to html.  No special test for a GET on service?wsdl.

The wsdl handling is done out of process_request(), which is called just below this code.  Process_request is passed in pTransport, which is constructed with the pointer to req_rec, so I guess it should be able to override the content type in there.  Sound like something safe to do?

R o b   Y a m p o l s k y
Harris Corporation
[EMAIL PROTECTED]
(212) 303 - 4250

Reply via email to