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 "Mats Staffansson (JIRA)" <ji...@apache.org> on 2008/09/18 15:05:44 UTC

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

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


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


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

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
    [ 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


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

Posted by "S.Uthaiyashankar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

S.Uthaiyashankar updated AXIS2C-1267:
-------------------------------------

    Fix Version/s: 1.6.0
         Assignee: S.Uthaiyashankar

> 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
>            Assignee: S.Uthaiyashankar
>             Fix For: 1.6.0
>
>         Attachments: jira-1267.patch
>
>   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.


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

Posted by "S.Uthaiyashankar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

S.Uthaiyashankar resolved AXIS2C-1267.
--------------------------------------

    Resolution: Fixed

Patch applied in revision 731522. Thank you very much for the patch

> 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
>            Assignee: S.Uthaiyashankar
>             Fix For: 1.6.0
>
>         Attachments: jira-1267.patch
>
>   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.


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

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajika Kumarasiri updated AXIS2C-1267:
--------------------------------------

    Attachment: jira-1267.patch

The given suggestions are available in the patch. Please review and apply the patch!

> 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
>         Attachments: jira-1267.patch
>
>   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