Ard Biesheuvel
f33265d572
cli: don't cast away const in select() timeout argument
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()
12 years ago
Christopher Jones
d0cd112702
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
A router can be used to add to, or override, the MIME type lookups,
see http://php.net/manual/en/features.commandline.webserver.php
12 years ago
Andrea Faulds
aee271ec0d
Implemented FR #65917 (getallheaders() is not supported by the built-in...)
- Implemented apache_request_headers() and getallheaders() alias in CLI server
- Implemented apache_response_headers() in CLI server using FastCGI code
Conflicts:
NEWS
UPGRADING
13 years ago
Felipe Pena
3aaee86ee3
- Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
13 years ago
Christopher Jones
dfa43d55dd
Added application/pdf to PHP CLI Web Server mime types.
13 years ago
Adam Harvey
3c3b2b5bdc
Handle CLI server request headers case insensitively.
Fixes bug #65633 (built-in server treat some http headers as case-sensitive).
13 years ago
Michael Wallner
bb1f9d3826
slim post data
13 years ago
Michael Wallner
2438490add
slim post data
13 years ago
Christopher Jones
9ad97cd489
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
13 years ago
Adam Harvey
f5c7fe9202
Fix the spelling of the php_cli_server_http_response_status_code_pair typedef.
Specifically: php_cli_server_http_reponse_status_code_pair →
php_cli_server_http_response_status_code_pair.
13 years ago
Adam Harvey
283f56af66
Change the search in get_status_string() to correctly handle unknown codes.
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).
13 years ago
Pierre Joye
bb18fa448c
- add reminder for checking return values
13 years ago
Pierre Joye
3af4896837
- 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
Signed-off-by: Anatol Belski <ab@php.net>
13 years ago
Pierre Joye
e6a9d1ca8d
- 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
13 years ago
Keyur Govande
a0a995cff3
Support for CLI process title ( https://wiki.php.net/rfc/cli_process_title )
A new commit into branch 5.5
13 years ago
Jonh Wendell
59b016192d
Added HTTP codes as of RFC 6585
Added descriptions for the new HTTP codes:
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 511 Network Authentication Required
13 years ago
Remi Collet
0cea9e6843
Fixed bug #64128 buit-in web server is broken on ppc64.
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.
13 years ago
Lars Strojny
785e66adb5
PR #260 : Update css for 404 pages to feel more up to date and have a consistent layout across browsers
13 years ago
Xinchen Hui
a666285bc2
Happy New Year
13 years ago
Xinchen Hui
0a7395e009
Happy New Year
13 years ago
pascalc
e5b1ebc082
update list of common Mime Types in PHP development server to support Web audio/video formats (Webm ,and Ogg containers) + have jpeg mime types listed together
13 years ago
Xinchen Hui
ea441bd08d
Implemented FR #63242 (Default error page in PHP built-in web server uses outdated html/css)
14 years ago
Niklas Lindgren
27542db4e7
Respond with 501 to unknown request methods
Fixed typo
Moved 501 response from dispatch to event_read_request
Return return value of send_error_page
14 years ago
Xinchen Hui
0988ae3c43
Implemented FR #62700 (have the console output 'Listening on http://localhost:8000 ')
14 years ago
Xinchen Hui
a88eca53f7
Improve error message for ssl request
14 years ago
Andrew Faulds
d12f8d6790
Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
- 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
14 years ago
stealth35
11a202ef50
Fix potential leak in cli server
14 years ago
Xinchen Hui
1e60d0c105
Implemented FR #61977 (Need CLI web-server support for files with .htm & svg extensions)
14 years ago
David Soria Parra
2cb0ed1328
Typo
14 years ago
Xinchen Hui
ad3a42c26c
correct variable name
14 years ago
Xinchen Hui
b999e91f5b
Make css string constant
14 years ago
Xinchen Hui
cc58373d4d
Improved performance while sending error page
this also fixed bug #61785 (Memory leak when access a non-exists file without router)
14 years ago
Ilia Alshanetsky
9dcfb8c73f
Fixed bug #61461 (missing checks around malloc() calls).
14 years ago
Xinchen Hui
4ff1126846
Implemented FR #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router)
14 years ago
Xinchen Hui
40cd3d54b9
Implemented FR #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router)
14 years ago
Xinchen Hui
024420e90b
Add Moriyoshi Koizumi and I to the cli SAPI credits
14 years ago
Xinchen Hui
0d076c3c77
Add Moriyoshi Koizumi and I to the cli SAPI credits
14 years ago
Rasmus Lerdorf
16748fe0fa
CLI Server was sending "Connection: closed" instead of "Connection: close"
14 years ago
Gustavo André dos Santos Lopes
6af0bdc2a3
- Connection: close, not "closed".
14 years ago
Michael Wallner
7aedbed543
fix usage of php_output_(de)activate; I guess this code doesn't bother about one more hack;
14 years ago
Michael Wallner
93c549913f
fix usage of php_output_(de)activate; I guess this code doesn't bother about one more hack;
14 years ago
Michael Wallner
c64a69c8b8
MFH: r322963
fix headers print to stdout/stderr if no output written;
fix crashes and invalid usage of output control in cli server while passing by
14 years ago
Michael Wallner
29c8658dc8
fix headers print to stdout/stderr if no output written; need to make some more testsbefore committing to PHP_5_4; fix crashes and invalid usage of output control in cli server while passing by
14 years ago
Felipe Pena
8775a37559
- Year++
14 years ago
Felipe Pena
4e19825281
- Year++
14 years ago
Xinchen Hui
77b97de8df
Fix bug #60591 (Memory leak when access a non-exists file)
14 years ago
Xinchen Hui
68147465af
Fix bug #60591 (Memory leak when access a non-exists file)
14 years ago
Xinchen Hui
80ab69876c
Fixed bug #60523 (PHP Errors are not reported in browsers using built-in SAPI)
14 years ago
Xinchen Hui
8b16b7bd4b
Fixed bug #60523 (PHP Errors are not reported in browsers using built-in SAPI)
14 years ago
Xinchen Hui
9751092fbc
add $_SERVER["SERVER_NAME"] since it's handy
14 years ago