Skip to content

Commit a1556ca

Browse files
committed
* buckets/hpack_buckets.c
(serf__bucket_hpack_setx): Use the new serf__tolower_inplace() instead of open-coding the same logic. git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1927633 13f79535-47bb-0310-9956-ffa450edef68
1 parent c45ed62 commit a1556ca

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

buckets/hpack_buckets.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ serf__bucket_hpack_setx(serf_bucket_t *bucket,
652652
{
653653
serf_hpack_context_t *ctx = bucket->data;
654654
serf_hpack_entry_t *entry;
655-
apr_size_t i;
656655

657656
for (entry = ctx->first; entry; entry = entry->next)
658657
{
@@ -694,11 +693,7 @@ serf__bucket_hpack_setx(serf_bucket_t *bucket,
694693
header field names MUST be treated as malformed (Section 8.1.2.6). */
695694

696695
char *ckey = serf_bstrmemdup(bucket->allocator, key, key_size);
697-
for (i = 0; i < key_size; i++)
698-
{
699-
if (ckey[i] >= 'A' && key[i] <= 'Z')
700-
ckey[i] += ('a' - 'A');
701-
}
696+
serf__tolower_inplace(ckey, key_size);
702697
entry->key = ckey;
703698
entry->free_key = true;
704699
}

0 commit comments

Comments
 (0)