Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 99100 invoked from network); 18 Dec 2009 08:21:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Dec 2009 08:21:44 -0000 Received: (qmail 56505 invoked by uid 500); 18 Dec 2009 08:21:44 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 56416 invoked by uid 500); 18 Dec 2009 08:21:43 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 56406 invoked by uid 99); 18 Dec 2009 08:21:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 08:21:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 08:21:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 306CA234C4C7 for ; Fri, 18 Dec 2009 00:21:20 -0800 (PST) Message-ID: <783817129.1261124480197.JavaMail.jira@brutus> Date: Fri, 18 Dec 2009 08:21:20 +0000 (UTC) From: "Nandika Jayawardana (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Resolved: (AXIS2C-1282) 1)reads all http headers from the request and adds them to the msg_ctx, they were missing. 2)Allows custumized http status and http headers for rest requests(don't affect soap requests). 3) Adds missing http forbidden definitions In-Reply-To: <446488673.1225709324236.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2C-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nandika Jayawardana resolved AXIS2C-1282. ----------------------------------------- Resolution: Fixed patch applied > 1)reads all http headers from the request and adds them to the msg_ctx, they were missing. 2)Allows custumized http status and http headers for rest requests(don't affect soap requests). 3) Adds missing http forbidden definitions > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: AXIS2C-1282 > URL: https://issues.apache.org/jira/browse/AXIS2C-1282 > Project: Axis2-C > Issue Type: Improvement > Components: httpd module > Affects Versions: 1.5.0 > Reporter: Luis Bilo > Assignee: Nandika Jayawardana > Priority: Minor > Fix For: 1.7.0 > > Attachments: apache_http_headers_and_rest_enhancement.diff, http_forbidden.diff > > Original Estimate: 1h > Remaining Estimate: 1h > > #1 Adds http headers to msg_ctx when using axis2/c module for apache > I noticed however this functionality were only implemented for the > standalone server. When using the axis module for apache http headers > were not added to the msg_ctx so they were not accessible @ the inflow > handlers level for instance. > #2 Adds forbidden definition tags for http forbidden code which is > missing in standard release > #define AXIS2_HTTP_RESPONSE_FORBIDDEN_CODE_VAL 403 > #define AXIS2_HTTP_RESPONSE_HTTP_FORBIDDEN_CODE_NAME "Forbidden" > #define AXIS2_HTTP_RESPONSE_HTTP_FORBIDDEN "403 Forbidden" > #3 Adds support to specify feedback for REST requests, when a module > failure occurs. > This issue is related to the difference between soap and rest > requests. When an inflow handler fails two things can happen depending > on the request type: > - For SOAP requests, the inflow handler chain is broken, and all the > outflow fault handlers are invoked. The response soap envelope > response containing a default fault is built by axis in between these > phases, so we can edit the fault accordingly @ the outflow fault > handlers. > - For REST requests, the inflow handler chain is also broken, but the > outflow fault handlers are not invoked. This is not a problem, and is > probably intended, since unlike soap there is no need to create a soap > envelope. The thing is when this happens it always returned 202 > ACCEPTED, which is not enough to provide any feedback to the user who > made the request. > @ the inflow handler is now possible to set the desired status code > desired for the response, extra http headers, and/or http content. It > was already possible before, changes just weren't propagated to the > actual response. > inflow handler example with the patch: > .. > // For REST requests > if (doing_rest && AXIS2_FAILURE == result) > { > axis2_msg_ctx_set_status_code(msg_ctx, env, > AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL); > AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[Inflow][authentication_in] > HTTP status code unauthorized"); > axutil_stream_t *stream = axutil_stream_create_basic(env); > axis2_char_t *http_content = axutil_strcat(env, > AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED, "\n", NULL); > axutil_stream_write(stream, env, http_content, axutil_strlen(http_content)); > axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, stream); > } > return result; > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.