axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r637043 - in /webservices/axis2/trunk/c: include/axis2_http_transport_utils.h src/core/transport/http/common/http_worker.c src/core/transport/http/util/http_transport_utils.c
Date Fri, 14 Mar 2008 10:39:27 GMT
Author: senaka
Date: Fri Mar 14 03:39:26 2008
New Revision: 637043

URL: http://svn.apache.org/viewvc?rev=637043&view=rev
Log:
Fixing JIRA Issue AXIS2C-1007

Modified:
    webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
    webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c
    webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c

Modified: webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_transport_utils.h?rev=637043&r1=637042&r2=637043&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport_utils.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_transport_utils.h Fri Mar 14 03:39:26 2008
@@ -146,6 +146,11 @@
         axis2_char_t * request_uri);
 
     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    axis2_http_transport_utils_get_not_found(
+        const axutil_env_t * env,
+        axis2_conf_ctx_t * conf_ctx);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 
     axis2_http_transport_utils_get_services_html(
         const axutil_env_t * env,

Modified: webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c?rev=637043&r1=637042&r2=637043&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c Fri Mar 14 03:39:26
2008
@@ -386,12 +386,26 @@
                                                      AXIS2_HTTP_HEADER_APPLICATION_XML);
                 axis2_http_simple_response_set_header(response, env, cont_type);
             }
-            else
+            else if (env->error->error_number == AXIS2_ERROR_SVC_OR_OP_NOT_FOUND)
             {
                 axis2_http_simple_response_set_status_line(response, env,
                                                            http_version,
                                                            404,
                                                            "Not Found");
+
+                body_string = axis2_http_transport_utils_get_not_found(env,
+                                                                       conf_ctx);
+                cont_type = axis2_http_header_create(env,
+                                                     AXIS2_HTTP_HEADER_CONTENT_TYPE,
+                                                     AXIS2_HTTP_HEADER_ACCEPT_TEXT_HTML);
+                axis2_http_simple_response_set_header(response, env, cont_type);
+            }
+            else
+            {
+                axis2_http_simple_response_set_status_line(response, env,
+                                                           http_version,
+                                                           500,
+                                                           "Internal Server Error");
 
                 body_string = axis2_http_transport_utils_get_services_html(env,
                                                                            conf_ctx);

Modified: webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c?rev=637043&r1=637042&r2=637043&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c Fri Mar
14 03:39:26 2008
@@ -1316,6 +1316,16 @@
 }
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_not_found(
+    const axutil_env_t * env,
+    axis2_conf_ctx_t * conf_ctx)
+{
+    return "<html><head><title>404 Not Found</title></head>"
+        "<body><h2>Not Found</h2><p>The requested URL was not"
+        " found on this server.</p></body></html>";
+}
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axis2_http_transport_utils_get_services_html(
     const axutil_env_t * env,
     axis2_conf_ctx_t * conf_ctx)



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message