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 su...@apache.org on 2008/06/25 12:01:45 UTC

svn commit: r671492 - /webservices/axis2/trunk/c/src/core/transport/http/server/IIS/axis2_iis_worker.c

Author: supun
Date: Wed Jun 25 03:01:45 2008
New Revision: 671492

URL: http://svn.apache.org/viewvc?rev=671492&view=rev
Log:
Service url was not set. Fixing it.

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/server/IIS/axis2_iis_worker.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/server/IIS/axis2_iis_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/IIS/axis2_iis_worker.c?rev=671492&r1=671491&r2=671492&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/server/IIS/axis2_iis_worker.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/server/IIS/axis2_iis_worker.c Wed Jun 25 03:01:45 2008
@@ -66,6 +66,8 @@
 
 axutil_hash_t *axis2_iis_worker_read_http_headers(const axutil_env_t * env, LPEXTENSION_CONTROL_BLOCK lpECB);
 
+AXIS2_IMPORT extern axis2_char_t *axis2_request_url_prefix;
+
 static struct reasons
 {    
     axis2_char_t * status_code;
@@ -271,6 +273,8 @@
 		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "IIS: Unsupported HTTP Method.");
 		return AXIS2_FAILURE;
 	}
+	/* Set the URL prefix */
+	request.request_url_prefix = axis2_request_url_prefix;
 	/* Create the transport out info */
 	request.out_transport_info = axis2_iis_out_transport_info_create(env, lpECB);
 	/* Set the content type */
@@ -313,8 +317,14 @@
 			is_out_headers_created = AXIS2_TRUE;
 		}
 		sprintf(content_length_str, "%d", response.response_data_length);
-
-		content_type_header = axis2_http_header_create(env, "Content-Type", axis2_iis_out_transport_get_content(request.out_transport_info));
+		if (!response.content_type)
+		{
+			content_type_header = axis2_http_header_create(env, "Content-Type", axis2_iis_out_transport_get_content(request.out_transport_info));
+		}
+		else
+		{
+			content_type_header = axis2_http_header_create(env, "Content-Type", response.content_type);
+		}
 		content_length_header = axis2_http_header_create(env, "Content-Length", content_length_str);
 		axutil_array_list_add(response.output_headers, env, content_length_header);
 		axutil_array_list_add(response.output_headers, env, content_type_header);