You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/11/19 07:27:55 UTC

svn commit: r596209 - in /webservices/axis2/trunk/c/src/core/transport/http: common/http_worker.c util/http_transport_utils.c

Author: dinesh
Date: Sun Nov 18 22:27:52 2007
New Revision: 596209

URL: http://svn.apache.org/viewvc?rev=596209&view=rev
Log:
fixed ?wsdl request didn't show wsdl file in the browser. Change content
type "text/xml" to "applicaiton/xml". "applicatoin/xml" is the suitable one
for xml documents.

Modified:
    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/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=596209&r1=596208&r2=596209&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 Sun Nov 18 22:27:52 2007
@@ -287,6 +287,7 @@
                 body_string = axis2_http_transport_utils_get_services_html(env,
                                                                            conf_ctx);
             }
+
             if (body_string)
             {
                 axis2_char_t str_len[10];
@@ -299,7 +300,7 @@
                 axis2_http_simple_response_set_header(response, env, cont_len);
                 cont_type = axis2_http_header_create(env,
                                                      AXIS2_HTTP_HEADER_CONTENT_TYPE,
-                                                     AXIS2_HTTP_HEADER_ACCEPT_TEXT_HTML);
+                                                     AXIS2_HTTP_HEADER_APPLICATION_XML);
                 axis2_http_simple_response_set_header(response, env, cont_type);
             }
             axis2_http_worker_set_response_headers(http_worker, env, svr_conn,
@@ -506,14 +507,17 @@
                                                                    env),
                                        AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE))
             {
-                axis2_http_header_t *header = axis2_http_header_create(env,
-                                                                       AXIS2_HTTP_HEADER_CONNECTION,
-                                                                       AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE);
+                axis2_http_header_t *header = axis2_http_header_create(
+                    env,
+                    AXIS2_HTTP_HEADER_CONNECTION,
+                    AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE);
+
                 axis2_http_simple_response_set_header(simple_response, env,
                                                       header);
                 axis2_simple_http_svr_conn_set_keep_alive(svr_conn, env,
                                                           AXIS2_TRUE);
             }
+
             if (0 == axutil_strcasecmp(axis2_http_header_get_value(conn_header,
                                                                    env),
                                        AXIS2_HTTP_HEADER_CONNECTION_CLOSE))

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=596209&r1=596208&r2=596209&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 Sun Nov 18 22:27:52 2007
@@ -904,9 +904,12 @@
     AXIS2_PARAM_CHECK(env->error, request_url, NULL);
 
     url_tok = axutil_parse_request_url_for_svc_and_op(env, request_url);
-    len = strlen(url_tok[0]);
-    url_tok[0][len - 5] = 0;
-    svc_name = url_tok[0];
+    if (url_tok[0])
+    {
+        len = strlen(url_tok[0]);
+        url_tok[0][len - 5] = 0;
+        svc_name = url_tok[0];
+    }
 
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     services_map = axis2_conf_get_all_svcs(conf, env);



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