fix headers to string generation
authorMichael Wallner <mike@php.net>
Sun, 18 Jan 2015 10:46:11 +0000 (11:46 +0100)
committerMichael Wallner <mike@php.net>
Sun, 18 Jan 2015 10:46:11 +0000 (11:46 +0100)
php_http_header.c

index 0ae381ea1469058fbd4e812effc7bcb3ccd4cb12..dfcba3c4433851983e5802e2dfc36cf2b052fec7 100644 (file)
@@ -72,12 +72,12 @@ void php_http_header_to_callback(HashTable *headers, zend_bool crlf, php_http_pa
                                        }
                                }
                                ZEND_HASH_FOREACH_END();
-                       }
-               } else {
-                       zend_string *zs = php_http_header_value_to_string(header);
+                       } else {
+                               zend_string *zs = php_http_header_value_to_string(header);
 
-                       cb(cb_arg, crlf ? "%s: %s" PHP_HTTP_CRLF : "%s: %s", key.key->val, zs->val);
-                       zend_string_release(zs);
+                               cb(cb_arg, crlf ? "%s: %s" PHP_HTTP_CRLF : "%s: %s", key.key->val, zs->val);
+                               zend_string_release(zs);
+                       }
                }
        }
        ZEND_HASH_FOREACH_END();