[
https://issues.apache.org/jira/browse/THRIFT-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190594#comment-15190594
]
ASF GitHub Bot commented on THRIFT-3734:
----------------------------------------
GitHub user mygityf opened a pull request:
https://github.com/apache/thrift/pull/942
THRIFT-3734 To compare two string as lowercase.
it looks unexpected result got when parameter a is uppercase and b is
lowercase.
split[0] is string of 'Content-Length', it contains character with
uppercase.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gityf/thrift d-http-parse-header-error
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/942.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #942
----
commit ec014bdd483fdb231c986f0cd1623430f11fbadd
Author: Wang Yaofu <[email protected]>
Date: 2016-03-11T07:53:53Z
THRIFT-3734 D To compare two string as lowercase.
it looks unexpected result got when parameter a is uppercase and b is
lowercase.
split[0] is string of 'Content-Length', it contains character with
uppercase.
----
> To compare two string as lowercase.
> -----------------------------------
>
> Key: THRIFT-3734
> URL: https://issues.apache.org/jira/browse/THRIFT-3734
> Project: Thrift
> Issue Type: Bug
> Components: D - Library
> Affects Versions: 0.9.3
> Reporter: WangYaofu
> Assignee: WangYaofu
> Fix For: 0.9.3
>
>
> static bool compToLower(ubyte a, ubyte b) {
> return a == toLower(cast(char)b);
> }
> it looks unexpected result got when parameter a is uppercase and b is
> lowercase.
> if (startsWith!compToLower(split[0], cast(ubyte[])"content-length")) {
> ...
> }
> split[0] is string of 'Content-Length', it contains character with uppercase.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)