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 sa...@apache.org on 2007/04/01 15:58:33 UTC
svn commit: r524597 - in /webservices/axis2/trunk/c: include/
modules/core/transport/http/common/ modules/core/transport/http/sender/
modules/core/transport/http/util/
Author: samisa
Date: Sun Apr 1 06:58:32 2007
New Revision: 524597
URL: http://svn.apache.org/viewvc?view=rev&rev=524597
Log:
Removed macros form http_header
Modified:
webservices/axis2/trunk/c/include/axis2_http_header.h
webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_request.c
webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_response.c
webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c
webservices/axis2/trunk/c/modules/core/transport/http/common/simple_http_svr_conn.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c
Modified: webservices/axis2/trunk/c/include/axis2_http_header.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_header.h?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_header.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_header.h Sun Apr 1 06:58:32 2007
@@ -94,21 +94,6 @@
axis2_http_header_create_by_str (const axutil_env_t *env,
const axis2_char_t *str);
-/** To external from. */
-#define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
- axis2_http_header_to_external_form(header, env)
-
-/** Gets the name. */
-#define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
- axis2_http_header_get_name(header, env)
-
-/** Get value. */
-#define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
- axis2_http_header_get_value(header, env)
-
-/** Frees the http header. */
-#define AXIS2_HTTP_HEADER_FREE(header, env) \
- axis2_http_header_free(header, env)
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_request.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_request.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_request.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_request.c Sun Apr 1 06:58:32 2007
@@ -112,7 +112,7 @@
{
tmp = (axis2_http_header_t *)axutil_array_list_get(
simple_request->header_group, env, i);
- AXIS2_HTTP_HEADER_FREE(tmp, env);
+ axis2_http_header_free(tmp, env);
}
axutil_array_list_free(simple_request->header_group, env);
@@ -172,7 +172,7 @@
for (i = 0; i < count; i++)
{
- header_name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
+ header_name = axis2_http_header_get_name((axis2_http_header_t *)
axutil_array_list_get(simple_request->header_group,
env, i), env);
if (0 == axis2_strcasecmp(name, header_name))
@@ -225,7 +225,7 @@
tmp_header = (axis2_http_header_t *)axutil_array_list_get(header_group,
env, i);
- tmp_name = AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env);
+ tmp_name = axis2_http_header_get_name(tmp_header, env);
if (0 == axis2_strcasecmp(str, tmp_name))
{
return tmp_header;
@@ -267,10 +267,10 @@
{
tmp_header = (axis2_http_header_t *)axutil_array_list_get(header_group,
env, i);
- tmp_name = AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env);
+ tmp_name = axis2_http_header_get_name(tmp_header, env);
if (0 == axis2_strcasecmp(str, tmp_name))
{
- AXIS2_HTTP_HEADER_FREE(tmp_header, env);
+ axis2_http_header_free(tmp_header, env);
axutil_array_list_remove(header_group, env, i);
break;
}
@@ -307,7 +307,7 @@
tmp_header = axis2_http_simple_request_get_first_header
(simple_request, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
if (tmp_header)
- return AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
+ return axis2_http_header_get_value(tmp_header, env);
return AXIS2_HTTP_HEADER_ACCEPT_TEXT_PLAIN;
}
@@ -324,7 +324,7 @@
(simple_request, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
if (tmp_header)
{
- axis2_char_t *value = AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
+ axis2_char_t *value = axis2_http_header_get_value(tmp_header, env);
axis2_char_t *charset = (axis2_char_t *)strstr((char *)value,
(char *)AXIS2_HTTP_CHAR_SET_ENCODING);
if (charset)
@@ -349,7 +349,7 @@
(simple_request, env, AXIS2_HTTP_HEADER_CONTENT_LENGTH);
if (tmp_header)
{
- return AXIS2_ATOI(AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env));
+ return AXIS2_ATOI(axis2_http_header_get_value(tmp_header, env));
}
return -1;
}
Modified: webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_response.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_response.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_response.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/common/http_simple_response.c Sun Apr 1 06:58:32 2007
@@ -114,7 +114,7 @@
simple_response->header_group, env, i);
if (tmp)
{
- AXIS2_HTTP_HEADER_FREE(tmp, env);
+ axis2_http_header_free(tmp, env);
}
}
axutil_array_list_free(simple_response->header_group, env);
@@ -255,7 +255,7 @@
{
tmp_header = (axis2_http_header_t *)axutil_array_list_get(header_group,
env, i);
- tmp_name = AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env);
+ tmp_name = axis2_http_header_get_name(tmp_header, env);
if (0 == axis2_strcasecmp(str, tmp_name))
{
return tmp_header;
@@ -298,10 +298,10 @@
{
tmp_header = (axis2_http_header_t *)axutil_array_list_get(header_group,
env, i);
- tmp_name = AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env);
+ tmp_name = axis2_http_header_get_name(tmp_header, env);
if (0 == axis2_strcasecmp(str, tmp_name))
{
- AXIS2_HTTP_HEADER_FREE(tmp_header, env);
+ axis2_http_header_free(tmp_header, env);
axutil_array_list_remove(header_group, env, i);
break;
}
@@ -341,11 +341,11 @@
{
tmp_header = (axis2_http_header_t *)axutil_array_list_get(header_group,
env, i);
- tmp_name = AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env);
- if (0 == axis2_strcasecmp(AXIS2_HTTP_HEADER_GET_NAME(header, env),
+ tmp_name = axis2_http_header_get_name(tmp_header, env);
+ if (0 == axis2_strcasecmp(axis2_http_header_get_name(header, env),
tmp_name))
{
- AXIS2_HTTP_HEADER_FREE(tmp_header, env);
+ axis2_http_header_free(tmp_header, env);
axutil_array_list_remove(header_group, env, i);
break;
}
@@ -367,7 +367,7 @@
(simple_response, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
if (tmp_header)
{
- axis2_char_t *value = AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
+ axis2_char_t *value = axis2_http_header_get_value(tmp_header, env);
axis2_char_t *charset = (axis2_char_t *)strstr((char *)value,
(char *)AXIS2_HTTP_CHAR_SET_ENCODING);
if (charset)
@@ -392,7 +392,7 @@
(simple_response, env, AXIS2_HTTP_HEADER_CONTENT_LENGTH);
if (tmp_header)
{
- return AXIS2_ATOI(AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env));
+ return AXIS2_ATOI(axis2_http_header_get_value(tmp_header, env));
}
return -1;
}
@@ -408,7 +408,7 @@
tmp_header = axis2_http_simple_response_get_first_header
(simple_response, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
if (tmp_header)
- return AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
+ return axis2_http_header_get_value(tmp_header, env);
return AXIS2_HTTP_HEADER_ACCEPT_TEXT_PLAIN;
}
@@ -533,7 +533,7 @@
for (i = 0; i < count; i++)
{
- header_name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
+ header_name = axis2_http_header_get_name((axis2_http_header_t *)
axutil_array_list_get(simple_response->header_group,
env, i), env);
if (0 == axis2_strcasecmp(name, header_name))
Modified: webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c Sun Apr 1 06:58:32 2007
@@ -160,7 +160,7 @@
env, AXIS2_HTTP_HEADER_TRANSFER_ENCODING);
if (encoding_header)
{
- encoding_header_value = AXIS2_HTTP_HEADER_GET_VALUE(encoding_header,
+ encoding_header_value = axis2_http_header_get_value(encoding_header,
env);
}
if (content_length < 0 && (encoding_header_value && 0 != axis2_strcmp
@@ -238,7 +238,7 @@
if (AXIS2_HTTP_SIMPLE_REQUEST_GET_FIRST_HEADER(simple_request, env,
AXIS2_HTTP_HEADER_SOAP_ACTION))
{
- soap_action = AXIS2_HTTP_HEADER_GET_VALUE(
+ soap_action = axis2_http_header_get_value(
AXIS2_HTTP_SIMPLE_REQUEST_GET_FIRST_HEADER(
simple_request, env, AXIS2_HTTP_HEADER_SOAP_ACTION),
env);
@@ -444,7 +444,7 @@
env, AXIS2_HTTP_HEADER_CONNECTION);
if (conn_header)
{
- if (0 == axis2_strcasecmp(AXIS2_HTTP_HEADER_GET_VALUE(conn_header,
+ if (0 == axis2_strcasecmp(axis2_http_header_get_value(conn_header,
env), AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE))
{
axis2_http_header_t *header = axis2_http_header_create(env,
@@ -455,7 +455,7 @@
AXIS2_SIMPLE_HTTP_SVR_CONN_SET_KEEP_ALIVE(svr_conn, env,
AXIS2_TRUE);
}
- if (0 == axis2_strcasecmp(AXIS2_HTTP_HEADER_GET_VALUE(conn_header,
+ if (0 == axis2_strcasecmp(axis2_http_header_get_value(conn_header,
env), AXIS2_HTTP_HEADER_CONNECTION_CLOSE))
{
axis2_http_header_t *header = axis2_http_header_create(env,
@@ -576,7 +576,7 @@
return NULL;
}
}
- axutil_hash_set(header_map, AXIS2_HTTP_HEADER_GET_NAME(tmp_hdr, env),
+ axutil_hash_set(header_map, axis2_http_header_get_name(tmp_hdr, env),
AXIS2_HASH_KEY_STRING, tmp_hdr);
}
return header_map;
Modified: webservices/axis2/trunk/c/modules/core/transport/http/common/simple_http_svr_conn.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/common/simple_http_svr_conn.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/common/simple_http_svr_conn.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/common/simple_http_svr_conn.c Sun Apr 1 06:58:32 2007
@@ -334,7 +334,7 @@
AXIS2_HTTP_HEADER_TRANSFER_ENCODING);
if (enc_header)
{
- axis2_char_t *enc_value = AXIS2_HTTP_HEADER_GET_VALUE(enc_header, env);
+ axis2_char_t *enc_value = axis2_http_header_get_value(enc_header, env);
if (enc_value)
{
if (0 == axis2_strcmp(enc_value,
@@ -374,7 +374,7 @@
if (header)
{
axis2_char_t *header_ext_form =
- AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(
+ axis2_http_header_to_external_form(
(axis2_http_header_t*)header, env);
AXIS2_HTTP_RESPONSE_WRITER_PRINT_STR(response_writer, env,
header_ext_form);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c Sun Apr 1 06:58:32 2007
@@ -244,14 +244,14 @@
}
/* check whether we have transfer encoding and then see whether the
* value is "chunked" */
- if (0 == axis2_strcmp(AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env),
+ if (0 == axis2_strcmp(axis2_http_header_get_name(tmp_header, env),
AXIS2_HTTP_HEADER_TRANSFER_ENCODING) && 0 ==
- axis2_strcmp(AXIS2_HTTP_HEADER_GET_VALUE(tmp_header,
+ axis2_strcmp(axis2_http_header_get_value(tmp_header,
env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
{
chunking_enabled = AXIS2_TRUE;
}
- header_ext_form = AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(
+ header_ext_form = axis2_http_header_to_external_form(
tmp_header, env);
str_header2 = axis2_stracat(env, str_header, header_ext_form);
AXIS2_FREE(env->allocator, str_header);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c Sun Apr 1 06:58:32 2007
@@ -552,7 +552,7 @@
AXIS2_HTTP_HEADER_CONTENT_TYPE);
if (tmp_header)
{
- tmp_header_val = AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
+ tmp_header_val = axis2_http_header_get_value(tmp_header, env);
}
@@ -623,12 +623,12 @@
for (i = 0; i < axutil_array_list_size(headers, env); i++)
{
axis2_http_header_t *header = axutil_array_list_get(headers, env, i);
- axis2_char_t *name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
+ axis2_char_t *name = axis2_http_header_get_name((axis2_http_header_t *)
header, env);
if (name)
{
if (0 == axis2_strcmp(name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING) &&
- 0 == axis2_strcmp(AXIS2_HTTP_HEADER_GET_VALUE(header
+ 0 == axis2_strcmp(axis2_http_header_get_value(header
, env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
{
axis2_char_t *transfer_encoding = NULL;
@@ -652,7 +652,7 @@
if (0 != axis2_strcmp(name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
{
axis2_char_t *tmp_charset = NULL;
- axis2_char_t *content_type = AXIS2_HTTP_HEADER_GET_VALUE(header,
+ axis2_char_t *content_type = axis2_http_header_get_value(header,
env);
tmp_charset = strstr(content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
if (charset)
Modified: webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c?view=diff&rev=524597&r1=524596&r2=524597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c Sun Apr 1 06:58:32 2007
@@ -237,7 +237,7 @@
if (encoding_header)
{
axis2_char_t *encoding_value = NULL;
- encoding_value = AXIS2_HTTP_HEADER_GET_VALUE(encoding_header, env);
+ encoding_value = axis2_http_header_get_value(encoding_header, env);
if (encoding_value && 0 == axis2_strcasecmp(encoding_value,
AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org