Response in POST with status code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Response in POST with status code

Guruprasad Nagaraj

The following snippet of code is from src/core/transport/http/common/http_worker.c:1711

                            axis2_http_simple_response_set_status_line(response, env, 
                            request_handled = AXIS2_TRUE;

                if (!request_handled)
                        response, env, http_version,

                    if (!is_head)
                        /* This is where we append the message into the http back channel.*/
                        axis2_http_simple_response_set_body_stream(response, env, out_stream);

In cases where a response (to a POST) with a specific status code needs to carry a specific body, I believe this code does not call axis2_http_simple_response_set_body_stream() . 
For e.g. If an application would like to send additional details for “Internal Server Error - HTTP 500” in the body, this snippet does not handle the condition.
Am I right? or should I be looking elsewhere?

Thanks and Best Regards,