Skip to content

Commit

Permalink
Merge pull request xdebug#30 from darrenoh/issue598-fix-forwarded-for
Browse files Browse the repository at this point in the history
Fixed issue xdebug#598: Xdebug was checking X-HTTP-FORWARDED-FOR instead of HTTP-X-FORWARDED-FOR
  • Loading branch information
derickr committed Sep 7, 2012
2 parents 1835a80 + 747cc91 commit 1806446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xdebug_stack.c
Expand Up @@ -478,7 +478,7 @@ void xdebug_init_debugger(TSRMLS_D)
if (XG(remote_connect_back)) { if (XG(remote_connect_back)) {
zval **remote_addr = NULL; zval **remote_addr = NULL;
XDEBUG_LOG_PRINT(XG(remote_log_file), "I: Checking remote connect back address.\n"); XDEBUG_LOG_PRINT(XG(remote_log_file), "I: Checking remote connect back address.\n");
if (zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "X_HTTP_FORWARDED_FOR", 21, (void**)&remote_addr) == FAILURE) { if (zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_X_FORWARDED_FOR", 21, (void**)&remote_addr) == FAILURE) {
zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "REMOTE_ADDR", 12, (void**)&remote_addr); zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "REMOTE_ADDR", 12, (void**)&remote_addr);
} }
if (remote_addr) { if (remote_addr) {
Expand Down

0 comments on commit 1806446

Please sign in to comment.