summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli_server.c
Commit message (Collapse)AuthorAgeFilesLines
* fix ts buldAnatol Belski2016-02-181-1/+1
|
* Fixed bug #71559 Built-in HTTP server, we can downlaod file in web by bugAnatol Belski2016-02-141-0/+13
|
* Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
|
* Added support for HTTP 451Julien Pauli2015-12-231-0/+1
|
* Fix #68291: 404 on urls with '+'Christoph M. Becker2015-09-051-2/+2
| | | | | URI paths have to be treated according to RFC 3986 by the CLI web server, not as application/x-www-form-urlencoded.
* Fix #70264: CLI server directory traversalChristoph M. Becker2015-08-141-0/+12
| | | | | | | | On Windows the built-in webserver doesn't prevent directory traversal when backslashes are used as path component separators. Even though that is not a security issue (the CLI webserver is meant for testing only), we fix that by replacing backslashes in the path with slashes on Windows, because backslashes may be valid characters for file names on other systems, but not on Windows.
* Fix #66606: Sets HTTP_CONTENT_TYPE but not CONTENT_TYPEwusuopu2015-08-091-0/+3
| | | | The patch will store Content-Type header value in both HTTP_CONTENT_TYPE field and CONTENT_TYPE field.
* Fix #64878: 304 responses return Content-Type headerChristoph M. Becker2015-06-271-0/+3
| | | | | According to RFC 7232 304 responses should not send a Content-Type header, so the CLI server should comply.
* bump yearXinchen Hui2015-01-151-1/+1
|
* Fix bug #68784Rasmus Lerdorf2015-01-091-1/+1
|
* Merge branch 'PHP-5.5' into PHP-5.6Adam Harvey2015-01-061-0/+5
|\ | | | | | | | | | | | | | | | | * PHP-5.5: Handle NULL strings in sapi_cli_server_register_variable(). Allow CLI server test scripts to specify the name of the router file. Conflicts: sapi/cli/tests/php_cli_server.inc
| * Handle NULL strings in sapi_cli_server_register_variable().Adam Harvey2015-01-061-0/+5
| | | | | | | | Fixes bug #68745 (Invalid HTTP requests make web server segfault).
| * Fix php cli (-S option) inconsistent port parsingnil0x422014-11-301-2/+2
| | | | | | | | | | | | Add port range verification of listening port with -S option for the php cli. This fixes inconsistent listening port due to unverified cast from long to short with htons(3).
* | Fix php cli (-S option) inconsistent port parsingnil0x422014-11-301-2/+2
| | | | | | | | | | | | Add port range verification of listening port with -S option for the php cli. This fixes inconsistent listening port due to unverified cast from long to short with htons(3).
* | Merge branch 'PHP-5.5' into PHP-5.6Tjerk Meesters2014-07-121-4/+8
|\ \ | |/
| * Fix #67594 - invisible colon should be stripped off header nameTjerk Meesters2014-07-121-4/+8
| |
* | Merge branch 'PHP-5.5' into PHP-5.6Adam Harvey2014-07-071-4/+3
|\ \ | |/ | | | | | | * PHP-5.5: Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
| * Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2014-07-071-4/+3
| |\ | | | | | | | | | | | | * PHP-5.4: Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
| | * Fixed bug #66830 (Empty header causes PHP built-in web server to hang).Adam Harvey2014-07-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | We had an infinite loop in sapi_cli_server_send_headers(): while iterating over the linked list of headers, when an empty header was hit, continue would go to the next iteration of the loop without updating h to be the next value in the linked list. Updating it to always increment regardless of whether the header is actually valid or not fixes the issue.
* | | Merge branch 'PHP-5.5' into PHP-5.6Adam Harvey2014-06-121-0/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-5.5: Add 308 and 426 to the HTTP response code map in the CLI server.
| * | Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2014-06-121-0/+2
| |\ \ | | |/ | | | | | | | | | * PHP-5.4: Add 308 and 426 to the HTTP response code map in the CLI server.
| | * Add 308 and 426 to the HTTP response code map in the CLI server.Adam Harvey2014-06-121-0/+2
| | | | | | | | | | | | Implements FR #67429 (CLI server is missing some new HTTP response codes).
* | | fix merge from php 5.5 (already fixed, differently)Remi Collet2014-06-101-5/+3
|\ \ \ | |/ /
| * | Merge branch 'PHP-5.4' into PHP-5.5Remi Collet2014-06-101-3/+3
| |\ \ | | |/ | | | | | | | | | | | | * PHP-5.4: NEWS Fixed bug #67406 built-in web-server segfaults on startup
| | * Fixed bug #67406 built-in web-server segfaults on startupRemi Collet2014-06-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Reproduce on aarch64. From select man page: "select() may update the timeout argument to indicate how much time was left." So "const" is not ok.
| | * Bump yearXinchen Hui2014-01-031-1/+1
| | |
* | | Merge branch 'PHP-5.5' into PHP-5.6Anatol Belski2014-04-161-0/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-5.5: Fixed bug #67079 Missing MIME types for XML/XSL files
| * | Fixed bug #67079 Missing MIME types for XML/XSL filesAnatol Belski2014-04-161-0/+3
| | |
| * | Bump yearXinchen Hui2014-01-031-1/+1
| | |
* | | Bump yearXinchen Hui2014-01-031-1/+1
| | |
* | | cli: don't cast away const in select() timeout argumentArd Biesheuvel2013-12-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The timeout argument to select() is modified to reflect the time remaining when the function returns on a non-timeout condition. Passing a pointer to const data and casting away the const-ness is asking for trouble, but for some reason, this trouble manifests itself only on non-x86 architectures [whose implementation of select() in glibc is different from the one supplied for x86] Fix this by passing a stack copy of the timeout argument to select()
* | | Merge branch 'PHP-5.5' into PHP-5.6Andrea Faulds2013-11-181-0/+79
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * PHP-5.5: Updated NEWS Removed UPGRADING note Rewrote test using tcp instead of http:// stream Implemented FR #65917 (getallheaders() is not supported by the built-in...)
| * | Merge branch 'CLIGetAllHeadersBackport' into PHP-5.5Andrea Faulds2013-11-181-0/+79
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * CLIGetAllHeadersBackport: Removed UPGRADING note Rewrote test using tcp instead of http:// stream Implemented FR #65917 (getallheaders() is not supported by the built-in...)
| | * | Implemented FR #65917 (getallheaders() is not supported by the built-in...)Andrea Faulds2013-11-121-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implemented apache_request_headers() and getallheaders() alias in CLI server - Implemented apache_response_headers() in CLI server using FastCGI code Conflicts: NEWS UPGRADING
* | | | Merge branch 'PHP-5.5' into PHP-5.6Christopher Jones2013-11-151-0/+36
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-5.5: This is CLI web server change. Added some common MIME types to the existing lookup list, pending a more thorough lookup solution, if anyone wants to do that. Ref http://news.php.net/php.internals/69990
| * | | This is CLI web server change. Added some common MIME types to theChristopher Jones2013-11-151-0/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | existing lookup list, pending a more thorough lookup solution, if anyone wants to do that. Ref http://news.php.net/php.internals/69990 A router can be used to add to, or override, the MIME type lookups, see http://php.net/manual/en/features.commandline.webserver.php
* | | Merge branch 'PHP-5.5'Felipe Pena2013-10-051-0/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | * PHP-5.5: - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding) - BFN Allow the ldap extension to be compiled with Oracle's LDAP implementation, if desired. Note the implementations differ so you will see different ldap behavior.
| * | Merge branch 'PHP-5.4' into PHP-5.5Felipe Pena2013-10-051-0/+1
| |\ \ | | |/ | | | | | | | | | | | | * PHP-5.4: - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding) - BFN
| | * - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer ↵Felipe Pena2013-10-051-0/+1
| | | | | | | | | | | | encoding)
* | | Merge branch 'PHP-5.5'Christopher Jones2013-09-191-0/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-5.5: Added application/pdf to PHP CLI Web Server mime types.
| * | Added application/pdf to PHP CLI Web Server mime types.Christopher Jones2013-09-191-0/+1
| | |
* | | Merge branch 'slim-postdata'Michael Wallner2013-09-171-2/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | * slim-postdata: slim post data add NEWS entry; add simple test more precise condition make this work in vc11 too Use int64_t and atoll() after discussion with johannes ws Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files above 2G.
| * | slim post dataMichael Wallner2013-08-271-2/+1
| | |
* | | Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2013-09-091-10/+7
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | * PHP-5.4: Handle CLI server request headers case insensitively. 5.4.21 now Conflicts: configure.in main/php_version.h
| * | Handle CLI server request headers case insensitively.Adam Harvey2013-09-091-10/+7
| | | | | | | | | | | | Fixes bug #65633 (built-in server treat some http headers as case-sensitive).
* | | Merge branch 'PHP-5.4' into PHP-5.5Christopher Jones2013-08-141-1/+1
|\ \ \ | |/ / | | / | |/ |/| | | | | | | * PHP-5.4: Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. Conflicts: ext/dba/libinifile/inifile.c
| * Reduce (some) compile noise of 'unused variable' and 'may be used ↵Christopher Jones2013-08-141-1/+1
| | | | | | | | uninitialized' warnings.
* | Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2013-06-201-18/+34
|\ \ | |/ | | | | | | | | * PHP-5.4: Fix the spelling of the php_cli_server_http_response_status_code_pair typedef. Change the search in get_status_string() to correctly handle unknown codes.
| * Fix the spelling of the php_cli_server_http_response_status_code_pair typedef.Adam Harvey2013-06-201-8/+8
| | | | | | | | | | Specifically: php_cli_server_http_reponse_status_code_pair → php_cli_server_http_response_status_code_pair.
| * Change the search in get_status_string() to correctly handle unknown codes.Adam Harvey2013-06-201-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This previously used a buggy implementation of binary search that would loop infinitely for unknown codes when searching in reason arrays of particular sizes (such as the one we have at the moment). Since C provides bsearch(), we'll just use that instead, since libc authors hopefully get this right. There was also an additional bug that was masked by the first one: the design was that an unknown code would result in get_status_string() returning NULL, which would then result in a segfault in append_http_status_line(), since it assumed that it would always receive a valid string pointer that could be handed off to smart_str_appends_ex(). We'll now return a placeholder in that case. Fixes bug #65066 (Cli server not responsive when responding with 422 http status code).