diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-03-14 18:00:42 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-03-14 18:00:42 +0400 |
commit | 232f3e915cf7499663d6f404e8f3dbf4985523fb (patch) | |
tree | 43006c05c5060b855459f2ae7fd27ae71bd029b5 /sapi/cli/php_cli_server.c | |
parent | c094fc11bea5bb733edb31aaa044b70ac5dc2d59 (diff) | |
download | php-git-232f3e915cf7499663d6f404e8f3dbf4985523fb.tar.gz |
Fixed various CLI problems
Diffstat (limited to 'sapi/cli/php_cli_server.c')
-rw-r--r-- | sapi/cli/php_cli_server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index f0160b495c..17c9270e0a 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -450,7 +450,7 @@ static void append_essential_headers(smart_str* buffer, php_cli_server_client *c { { char *val; - if (SUCCESS == (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) { + if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) { smart_str_appendl_ex(buffer, "Host", sizeof("Host") - 1, persistent); smart_str_appendl_ex(buffer, ": ", sizeof(": ") - 1, persistent); smart_str_appends_ex(buffer, val, persistent); @@ -519,7 +519,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS do { p++; } while (*p == ' ' || *p == '\t'); - add_assoc_stringl_ex(return_value, s, len+1, p, h->header_len - (p - h->header), 1); + add_assoc_stringl_ex(return_value, s, len, p, h->header_len - (p - h->header), 1); free_alloca(s, use_heap); } } |