Errors are reported to the client instead of ignoring them. #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At our company, we have been using php-cross-domain-proxy quite intensively. In general it works great but when issues occur it does not always behave as expected. To give an example: It sometimes sends a 200 HTTP reply and an empty answer in cases when it cannot connect to the server hosting the data to be proxied.
When a valid answer can be empty this effectively and efficiently breaks client-side error detection. We therefore modified the proxy to improve error handling by making the proxy inform the client about what went wrong instead of silently discarding certain error conditions.
One more aspect: When developing a quite involved application that uses the proxy for accessing a number of sites it can easily happen that you try to access a site that is not yet whitelisted. To easily detect this we found it very helpful to have the proxy report a HTTP response of 403 that reports that the access was denied due to the site not being whitelisted. You immediately see the issue in the browser's developer tools and simply can open the link to see what precisely went wrong (i.e. which site caused the error).
As in our application we find this modification quite useful we suggest to make it