Adam Harvey
3c3b2b5bdc
Handle CLI server request headers case insensitively.
...
Fixes bug #65633 (built-in server treat some http headers as case-sensitive).
2013-09-09 16:24:49 -07:00
Christopher Jones
9ad97cd489
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
2013-08-14 20:36:50 -07:00
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.
2013-06-20 09:34:21 -07:00
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).
2013-06-20 09:31:57 -07:00
Pierre Joye
bb18fa448c
- add reminder for checking return values
2013-03-24 13:27:00 +01:00
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>
2013-03-23 22:42:03 +01:00
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
2013-02-17 01:18:40 -08:00
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.
2013-02-01 19:23:25 +01:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
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
2012-12-14 13:59:01 +01:00
Xinchen Hui
ea441bd08d
Implemented FR #63242 (Default error page in PHP built-in web server uses outdated html/css)
2012-10-10 17:23:30 +08:00
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
2012-09-15 23:11:12 -07:00
Xinchen Hui
0988ae3c43
Implemented FR #62700 (have the console output 'Listening on http://localhost:8000 ')
2012-07-31 22:42:28 +08:00
Xinchen Hui
a88eca53f7
Improve error message for ssl request
2012-07-22 19:20:23 +08:00
stealth35
11a202ef50
Fix potential leak in cli server
2012-06-16 00:56:54 +03:00
Xinchen Hui
1e60d0c105
Implemented FR #61977 (Need CLI web-server support for files with .htm & svg extensions)
2012-05-09 11:27:39 +08:00
David Soria Parra
2cb0ed1328
Typo
2012-05-08 22:08:54 +02:00
Xinchen Hui
ad3a42c26c
correct variable name
2012-05-06 20:37:03 +08:00
Xinchen Hui
b999e91f5b
Make css string constant
2012-04-21 09:31:00 +08:00
Xinchen Hui
cc58373d4d
Improved performance while sending error page
...
this also fixed bug #61785 (Memory leak when access a non-exists file without router)
2012-04-21 00:01:10 +08:00
Ilia Alshanetsky
9dcfb8c73f
Fixed bug #61461 (missing checks around malloc() calls).
2012-03-20 21:07:08 -04:00
Xinchen Hui
40cd3d54b9
Implemented FR #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router)
2012-03-11 08:56:14 +00:00
Xinchen Hui
0d076c3c77
Add Moriyoshi Koizumi and I to the cli SAPI credits
2012-03-11 08:41:40 +00:00
Rasmus Lerdorf
16748fe0fa
CLI Server was sending "Connection: closed" instead of "Connection: close"
2012-03-02 03:38:04 +00:00
Michael Wallner
93c549913f
fix usage of php_output_(de)activate; I guess this code doesn't bother about one more hack;
2012-01-31 10:47:21 +00:00
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
2012-01-31 09:58:26 +00:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Xinchen Hui
77b97de8df
Fix bug #60591 (Memory leak when access a non-exists file)
2011-12-22 07:39:44 +00:00
Xinchen Hui
80ab69876c
Fixed bug #60523 (PHP Errors are not reported in browsers using built-in SAPI)
2011-12-16 19:25:03 +00:00
Xinchen Hui
e29c46a50d
add $_SERVER["SERVER_NAME"] since it's handy
2011-12-09 16:16:31 +00:00
Xinchen Hui
8fff0e86d7
fix memory leak
2011-12-09 14:05:26 +00:00
Xinchen Hui
147c414279
Fixed bug #60477 (Segfault after two multipart/form-data POST requests)
2011-12-09 05:37:41 +00:00
Pierre Joye
653e68233a
- implement FR #60390 , SERVER_PORT missing
2011-11-25 21:18:40 +00:00
Xinchen Hui
f8386e349f
Fixed bug #60159 (Router returns false, but POST is not passed to requested
...
resource) and bug #55759 (mem leak when use built-in server)
2011-11-15 03:15:19 +00:00
Xinchen Hui
ceac9dc490
Fixed bug #60189 (php logo can not be displayed)
2011-11-01 13:06:41 +00:00
Xinchen Hui
ac789e0bb6
Fixed Bug #60180 ($_SERVER["PHP_SELF"] incorrect)
2011-11-01 12:24:02 +00:00
Xinchen Hui
091f279eb0
Fixed bug #60146 (Last 2 lines of page not being output)
2011-10-29 02:14:04 +00:00
Xinchen Hui
08d372716c
A better fix, sorry for previous thoughtlessness commit.
2011-10-24 03:47:42 +00:00
Xinchen Hui
d8911efbb6
Fixed PATH_INFO of /index.php/foo/bar
2011-10-24 03:28:59 +00:00
Xinchen Hui
a6bc3f6c59
fix memory leak
2011-10-23 03:02:24 +00:00
Xinchen Hui
8d467563e2
Fixed bug #60112 If URI does not contain a file, index.php is not served
...
This is a windows Issue.
and after this fix, previously 404 request like "localhost/foo/bar"
now could server correctly with request_uri "index.php" and PATH_INFO "/foo/bar/"
2011-10-23 02:54:06 +00:00
Moriyoshi Koizumi
2cf34bc9fc
Add SERVER_PROTOCOL variable to $_SERVER. Patch by kuzuha. Thanks.
2011-10-21 05:24:30 +00:00
Xinchen Hui
d603d05398
Fixed bug #55755 (SegFault when outputting header WWW-Authenticate)
2011-09-21 16:00:09 +00:00
Xinchen Hui
c83594cd7a
Remove double checking, and use MAXPATHLEN instead of a fixed length
2011-09-21 06:59:47 +00:00
Xinchen Hui
f3aa34a90d
Change to a more appropriate name
2011-09-21 03:16:35 +00:00
Xinchen Hui
82be5fcc4f
Fixed bug #55747 (request headers missed in $_SERVER)
2011-09-21 03:09:42 +00:00
Xinchen Hui
5dbf73a866
Fix Bug #55726 (Changing the working directory makes router script inaccessible)
2011-09-20 07:06:55 +00:00
Xinchen Hui
6bd693543b
Fix folder
2011-09-20 05:07:15 +00:00
Xinchen Hui
66bcb34bf4
Fixed Bug #55423(cli-server could not output correctly in some case)
2011-09-07 05:14:54 +00:00
Arpad Ray
8590f2587a
add friendly log messages (req #55109 )
2011-08-29 21:59:27 +00:00