# HG changeset patch # User Andrei Belov # Date 1358409728 -14400 # Node ID bf6b05f034581c8bf7fca64683aa54e167714951 # Parent 6072306b7924b6c8bec431ef448fe02344e44889 Tests: add realip tests for multiple X-Forwarded-For headers. diff --git a/realip.t b/realip.t --- a/realip.t +++ b/realip.t @@ -65,7 +65,7 @@ EOF plan(skip_all => 'no 127.0.0.1 on host') if http_get('/1') !~ /X-IP: 127.0.0.1/m; -$t->plan(4); +$t->plan(6); ############################################################################### @@ -74,9 +74,32 @@ like(http_xff('/1', '10.0.0.1, 192.0.2.1 'realip multi'); like(http_xff('/1', '192.0.2.1, 10.0.1.1, 127.0.0.1'), qr/^X-IP: 127.0.0.1/m, 'realip recursive off'); -like(http_xff('/2', '192.0.2.1, 10.0.1.1, 127.0.0.1'), +like(http_xff('/2', '10.0.1.1, 192.0.2.1, 127.0.0.1'), qr/^X-IP: 192.0.2.1/m, 'realip recursive on'); +TODO: { + +local $TODO = 'not yet'; + +like(http(<