Athlon1600 / php-proxy

A web proxy script written in PHP and built as an alternative to Glype.
https://www.php-proxy.com
MIT License
295 stars 158 forks source link

Missing descriptions of code statuses #146

Open Xerphis opened 3 years ago

Xerphis commented 3 years ago
Undefined offset: 422 in ...athlon1600\php-proxy\src\Http\Response.php on line 77

In Response class, in status codes missing some of descriptions from status codes. For example: 422 - but there are more codes without description. If index (status code) not exists, php throw notice message. Other descriptions that should be completed can be found here.

Moreover, code descriptions should first come from the original http response, and as a last resort, if the description from the response does empty, it should be overwritten with the description from $statusCodes. Otherwise, if the index in $statusCodes is not found, the method getStatusText should return an default value (empty string).