summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli_server.c
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* | Merge branch 'PHP-5.4' into PHP-5.5Pierre Joye2013-03-241-0/+2
|\ \ | |/ | | | | | | * PHP-5.4: - add reminder for checking return values
| * - add reminder for checking return valuesPierre Joye2013-03-241-0/+2
| |
* | Merge branch 'PHP-5.4' into PHP-5.5Anatol Belski2013-03-231-16/+43
|\ \ | |/ | | | | | | * PHP-5.4: - fix x64 issues on windows with the various time types (overflow, signed and unsigned bits ops, etc.) causing crashes on start, error or log, must be done in win32/time.c for some of these functions too
| * - fix x64 issues on windows with the various time types (overflow, signed ↵Pierre Joye2013-03-231-16/+43
| | | | | | | | | | | | and unsigned bits ops, etc.) causing crashes on start, error or log, must be done in win32/time.c for some of these functions too Signed-off-by: Anatol Belski <ab@php.net>
* | Support for CLI process title (https://wiki.php.net/rfc/cli_process_title)Keyur Govande2013-03-071-0/+8
| | | | | | | | A new commit into branch 5.5
* | Merge branch 'PHP-5.4' into PHP-5.5Stanislav Malyshev2013-02-171-0/+4
|\ \ | |/ | | | | | | * PHP-5.4: Added HTTP codes as of RFC 6585
| * Added HTTP codes as of RFC 6585Jonh Wendell2013-02-171-0/+4
| | | | | | | | | | | | | | | | | | Added descriptions for the new HTTP codes: - 428 Precondition Required - 429 Too Many Requests - 431 Request Header Fields Too Large - 511 Network Authentication Required
* | Merge branch 'PHP-5.4' into PHP-5.5Remi Collet2013-02-011-17/+13
|\ \ | |/ | | | | | | * PHP-5.4: Fixed bug #64128 buit-in web server is broken on ppc64.
| * Fixed bug #64128 buit-in web server is broken on ppc64.Remi Collet2013-02-011-17/+13
| | | | | | | | | | | | fdset management using bit operator is broken on non-x86 arch and cause built-in server the enter an infinite loop of "select" and never handle any request.
| * Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | PR #260: Update css for 404 pages to feel more up to date and have a ↵Lars Strojny2013-01-141-3/+5
| | | | | | | | consistent layout across browsers
* | Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | Merge branch 'PHP-5.4' into PHP-5.5Lars Strojny2012-12-141-1/+4
|\ \ | |/
| * update list of common Mime Types in PHP development server to support Web ↵pascalc2012-12-141-1/+4
| | | | | | | | audio/video formats (Webm ,and Ogg containers) + have jpeg mime types listed together
* | Merge branch 'PHP-5.4'Xinchen Hui2012-10-101-21/+9
|\ \ | |/
| * Implemented FR #63242 (Default error page in PHP built-in web server uses ↵Xinchen Hui2012-10-101-21/+9
| | | | | | | | outdated html/css)
* | Merge branch 'PHP-5.4'Stanislav Malyshev2012-09-151-19/+22
|\ \ | |/ | | | | | | * PHP-5.4: Respond with 501 to unknown request methods
| * Respond with 501 to unknown request methodsNiklas Lindgren2012-09-151-19/+22
| | | | | | | | | | | | | | | | Fixed typo Moved 501 response from dispatch to event_read_request Return return value of send_error_page
* | Merge branch 'pull-request/132'Stanislav Malyshev2012-08-051-29/+27
|\ \ | |/ |/| | | | | | | | | | | | | * pull-request/132: OK, bye bye JavaScript, let's just include credits before license Nicer (JSLint-compliant!) credits reveal JavaScript Removed now-unnecessary expose_php checks for logo Fixed small misalignment in prev commit Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
| * Removed Logo GUIDs and replaced with Data URIs and div hidden with JSAndrew Faulds2012-07-141-29/+27
| | | | | | | | | | | | | | | | | | | | | | - removed php_logo_guid() - removed php_egg_logo_guid() - removed php_real_logo_guid() - removed zend_logo_guid() - removed logo GUID handling - removed logo GUIDs from source - added logo data URIs instead for phpinfo() - added credits to phpinfo() page, but hidden by default
* | Implemented FR #62700 (have the console output 'Listening on ↵Xinchen Hui2012-07-311-1/+1
| | | | | | | | http://localhost:8000')
* | Improve error message for ssl requestXinchen Hui2012-07-221-1/+5
|/
* Fix potential leak in cli serverstealth352012-06-161-0/+3
|
* Implemented FR #61977 (Need CLI web-server support for files with .htm & svg ↵Xinchen Hui2012-05-091-5/+7
| | | | extensions)
* TypoDavid Soria Parra2012-05-081-1/+1
|
* correct variable nameXinchen Hui2012-05-061-14/+14
|
* Make css string constantXinchen Hui2012-04-211-1/+1
|
* Improved performance while sending error pageXinchen Hui2012-04-211-67/+30
| | | | this also fixed bug #61785 (Memory leak when access a non-exists file without router)
* Fixed bug #61461 (missing checks around malloc() calls).Ilia Alshanetsky2012-03-201-0/+10
|
* Implemented FR #60850 (Built in web server does not set ↵Xinchen Hui2012-03-111-0/+5
| | | | $_SERVER['SCRIPT_FILENAME'] when using router)