serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1710973 - /serf/trunk/buckets/hpack_buckets.c
Date Wed, 28 Oct 2015 09:53:30 GMT
Author: rhuijben
Date: Wed Oct 28 09:53:30 2015
New Revision: 1710973

URL: http://svn.apache.org/viewvc?rev=1710973&view=rev
Log:
* buckets/hpack_buckets.c
  (header): Fix indentation.

Modified:
    serf/trunk/buckets/hpack_buckets.c

Modified: serf/trunk/buckets/hpack_buckets.c
URL: http://svn.apache.org/viewvc/serf/trunk/buckets/hpack_buckets.c?rev=1710973&r1=1710972&r2=1710973&view=diff
==============================================================================
--- serf/trunk/buckets/hpack_buckets.c (original)
+++ serf/trunk/buckets/hpack_buckets.c Wed Oct 28 09:53:30 2015
@@ -1,22 +1,22 @@
 /* ====================================================================
-*    Licensed to the Apache Software Foundation (ASF) under one
-*    or more contributor license agreements.  See the NOTICE file
-*    distributed with this work for additional information
-*    regarding copyright ownership.  The ASF licenses this file
-*    to you under the Apache License, Version 2.0 (the
-*    "License"); you may not use this file except in compliance
-*    with the License.  You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-*    Unless required by applicable law or agreed to in writing,
-*    software distributed under the License is distributed on an
-*    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-*    KIND, either express or implied.  See the License for the
-*    specific language governing permissions and limitations
-*    under the License.
-* ====================================================================
-*/
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ */
 
 #include <stdlib.h>
 
@@ -462,11 +462,16 @@ hpack_copy_from_headers(void *baton,
                         const char *value)
 {
   serf_bucket_t *hpack = baton;
+  apr_size_t key_sz = strlen(key);
 
   /* TODO: Others? */
-  if (!strcasecmp(key, "Host")
-      || !strcasecmp(key, "Connection")
-      || !strncasecmp(key, "Connection-", 11))
+  if ((key_sz == 4 && !strcasecmp(key, "Host"))
+      || (key_sz == 7 && !strcasecmp(key, "Upgrade"))
+      || (key_sz == 10 && !strcasecmp(key, "Keep-Alive"))
+      || (key_sz == 10 && !strcasecmp(key, "Connection"))
+      || (key_sz > 11 && !strncasecmp(key, "Connection-", 11))
+      || (key_sz == 16 && !strcasecmp(key, "Proxy-Connection"))
+      || (key_sz == 17 && !strcasecmp(key, "Transfer-Encoding")))
     {
       return APR_SUCCESS;
     }



Mime
View raw message