You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Rajika Kumarasiri (JIRA)" <ji...@apache.org> on 2008/09/28 10:53:44 UTC

[jira] Commented: (AXIS2C-1267) HTTP headers case sensitive in http_sender.c

    [ https://issues.apache.org/jira/browse/AXIS2C-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635216#action_12635216 ] 

Rajika Kumarasiri commented on AXIS2C-1267:
-------------------------------------------

According to the RFC 2616 HTTP headers are case insensitive, but the HTTP method suppose to be case sensitive. Upon doing a quick search I found that the same thing happens with string searching with strstr, and should be replaced with strcasestr in Linux.

> HTTP headers case sensitive in http_sender.c
> --------------------------------------------
>
>                 Key: AXIS2C-1267
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1267
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/transport
>    Affects Versions: 1.5.0
>            Reporter: Mats Staffansson
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> HTTP headers should be compared case insensitive.
> --- src/core/transport/http/sender/http_sender.c        2008-09-18 11:25:39.000000000 +0200
> +++ src/core/transport/http/sender/http_sender.c.patched        2008-09-18 12:02:09.000000000 +0200
> @@ -1471,7 +1471,7 @@
>                                                           header, env);
>          if (name)
>          {
> -            if (0 == axutil_strcmp (name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING)
> +            if (0 == axutil_strcasecmp (name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING)
>                  && 0 ==
>                  axutil_strcmp (axis2_http_header_get_value (header, env),
>                                 AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
> @@ -1485,7 +1485,7 @@
>                                                       env, transfer_encoding);
>  
>              }
> -            if (0 != axutil_strcmp (name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
> +            if (0 != axutil_strcasecmp (name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
>              {
>                  axis2_char_t *tmp_charset = NULL;
>                  axis2_char_t *content_type =
> [

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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