Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
ralt committed Nov 25, 2014
1 parent 4f76531 commit 2e0db17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sapi/fpm/fpm/fpm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ static inline void fcgi_hash_apply(HashTable *h, fcgi_apply_func func, void *arg
while (p) {
if (EXPECTED(p->arKey != NULL)) {
/* Since request->env already has the terminating char, -1 to var_len */
func((char*)p->arKey, p->nKeyLength-1, *(char**)p->pData, strlen(*(char**)p->pData), arg TSRMLS_CC);
func((char*)p->arKey, p->nKeyLength, *(char**)p->pData, strlen(*(char**)p->pData), arg TSRMLS_CC);
}
p = p->pListNext;
}
Expand Down
11 changes: 7 additions & 4 deletions sapi/fpm/tests/018.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ $fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
fpm_display_log($tail, 2);
try {
$headers = ['HTTP_X_TEST' => 'Pass'];
$req = run_request('127.0.0.1', $port, $srcfile, '', $headers);
$headers = [
'HTTP_X_FOO' => 'BAR',
'HTTP_CONTENT_TYPE' => 'text/html; charset=UTF-8',
];
$req = run_request('127.0.0.1', $port, $srcfile, '');
echo strstr($req, "Test Start");
echo "Request ok\n";
} catch (Exception $e) {
Expand All @@ -55,8 +58,8 @@ Done
[%s] NOTICE: ready to handle connections
Test Start
array(1) {
["X-Test"]=>
string(4) "Pass"
["X-Foo"]=>
string(4) "Bar"
}
Test End

Expand Down

0 comments on commit 2e0db17

Please sign in to comment.