Bug #76010 [Com]: Built in server slices the $_SERVER['REQUEST_URI'] value

From: Date: Tue, 27 Feb 2018 03:02:37 +0000
Subject: Bug #76010 [Com]: Built in server slices the $_SERVER['REQUEST_URI'] value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214120@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76010&edit=1 ID: 76010 Comment by: mattficken@php.net Reported by: t dot gemza at secit dot pl Summary: Built in server slices the $_SERVER['REQUEST_URI'] value Status: Open Type: Bug Package: Built-in web server Operating System: Windows 7 and 8 64bit PHP Version: 7.2.2 Block user comment: N Private report: N New Comment: Thanks for all the info up front. However, I can NOT reproduce this issue with 7.2.2-nts The repro script you provided should be saved as index.php, correct? That should either always work or always fail, not 3% of time. Would you run curl with --verbose ? or use the Live HTTP Headers extension in Firefox? Maybe curl isn't providing or receiving all the path? Where is the XXXXX returned by curl? In the name of the file that curl creates or in the file that curl creates? Previous Comments: ------------------------------------------------------------------------ [2018-02-26 08:10:54] t dot gemza at secit dot pl I forgot to add. The built in server was always run with a following command: php.exe -S 127.0.0.1:8001 ------------------------------------------------------------------------ [2018-02-26 08:06:26] t dot gemza at secit dot pl Description: ------------ The built in server slices the $_SERVER['REQUEST_URI'] value as shown on examples below. The problem is confirmed on Windows 7 and 8 64bit machines with following PHP versions: VC15 x64 Non Thread Safe (2018-Jan-31 23:18:33) http://windows.php.net/downloads/releases/php-7.2.2-nts-Win32-VC15-x64.zip VC15 x64 Thread Safe (2018-Jan-31 23:18:51) http://windows.php.net/downloads/releases/php-7.2.2-Win32-VC15-x64.zip VC14 x64 Non Thread Safe (2018-Jan-31 23:22:44) http://windows.php.net/downloads/releases/php-7.1.14-nts-Win32-VC14-x64.zip VC14 x64 Thread Safe (2018-Jan-31 23:23:00) http://windows.php.net/downloads/releases/php-7.1.14-Win32-VC14-x64.zip The problem was also confirmed on machines with PHP 7.1.10 and 7.2.1 (XAMP). The problem will never be 100% reproducable. In our tests the full REQUST_URI was returned in about 3% of all of the test script runs. So if you can not reproduce it try different PHP version and than back to the previously tested - it should appear. Test script: --------------- ---- CODE START ---- <?php echo $_SERVER['REQUEST_URI']; ---- CODE END ---- CURL command: curl "http://127.0.0.1:8001/administrator/dealer/account/?draw=3^&columns^%^5B0^%^5D^%^5Bdata^%^5D=id^&columns^%^5B0^%^5D^%^5Bname^%^5D=^&columns^%^5B0^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B0^%^5D^%^5Borderable^%^5D=true^&columns^%^5B0^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B0^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B1^%^5D^%^5Bdata^%^5D=name^&columns^%^5B1^%^5D^%^5Bname^%^5D=^&columns^%^5B1^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B1^%^5D^%^5Borderable^%^5D=true^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B2^%^5D^%^5Bdata^%^5D=lastName^&columns^%^5B2^%^5D^%^5Bname^%^5D=^&columns^%^5B2^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B2^%^5D^%^5Borderable^%^5D=true^&columns^%^5B2^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B2^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B3^%^5D^%^5Bdata^%^5D=address^&columns^%^5B3^%^5D^%^5Bname^%^5D=^&columns^%^5B3^%^5D^%^5Bsearc! hable^%^5D=true^&columns^%^5B3^%^5D^%^5Borderable^%^5D=true^&columns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B4^%^5D^%^5Bdata^%^5D=postalCode^&columns^%^5B4^%^5D^%^5Bname^%^5D=^&columns^%^5B4^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B4^%^5D^%^5Borderable^%^5D=true^&columns^%^5B4^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B4^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B5^%^5D^%^5Bdata^%^5D=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Expected result: ---------------- Whole request URI started with /administrator/dealer/account/?draw=3&... Actual result: -------------- C:\>curl "http://127.0.0.1:8001/administrator/dealer/account/?draw=3^& columns^%^5B0^%^5D^%^5Bdata^%^5D=id^&columns^%^5B0^%^5D^%^5Bname^%^5D=^&columns^ %^5B0^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B0^%^5D^%^5Borderable^%^5D=true^ &columns^%^5B0^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B0^%^5D^%^5Bsear ch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B1^%^5D^%^5Bdata^%^5D=name^&columns^%^5 B1^%^5D^%^5Bname^%^5D=^&columns^%^5B1^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5 B1^%^5D^%^5Borderable^%^5D=true^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^ 5D=^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B2^%^5D ^%^5Bdata^%^5D=lastName^&columns^%^5B2^%^5D^%^5Bname^%^5D=^&columns^%^5B2^%^5D^% ^5Bsearchable^%^5D=true^&columns^%^5B2^%^5D^%^5Borderable^%^5D=true^&columns^%^5 B2^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B2^%^5D^%^5Bsearch^%^5D^%^5B regex^%^5D=false^&columns^%^5B3^%^5D^%^5Bdata^%^5D=address^&columns^%^5B3^%^5D^% ^5Bname^%^5D=^&columns^%^5B3^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B3^%^5D^% ^5Borderable^%^5D=true^&columns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&colu mns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B4^%^5D^%^5Bdata ^%^5D=postalCode^&columns^%^5B4^%^5D^%^5Bname^%^5D=^&columns^%^5B4^%^5D^%^5Bsear chable^%^5D=true^&columns^%^5B4^%^5D^%^5Borderable^%^5D=true^&columns^%^5B4^%^5D ^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B4^%^5D^%^5Bsearch^%^5D^%^5Bregex^% ^5D=false^&columns^%^5B5^%^5D^%^5Bdata^%^5D=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Only the XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX are returned ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76010&edit=1

« previous php.bugs (#214120) next »