1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/sapi/cli/tests
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
..
2008-09-30 15:11:05 +00:00
2012-11-14 16:20:59 +01:00
2011-05-05 18:30:14 +00:00
2008-08-14 20:51:35 +00:00
2013-03-28 18:42:01 +01:00
2012-04-19 20:05:30 -03:00
2012-04-21 10:15:35 +08:00