-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following links in a 301 response for a sparql query #385
Comments
Mostly handled by PR #379, as the PSR HTTP client provided by implementor can be configured with desidered behaviour (handle as many redirects as required, or just fail when a redirect is found). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior
The following code throws a Http\Exception stating that the HTTP request for SPARQL query failed, and doesn't return any information about the response:
Expected behavior
When there is a 301/302/303/307/308 HTTP response to the query and the Location header is set, we could automatically try again the query with the new Location instead of imediatly throwing the error. We could easily keep in sight the previous automatic redirections in order to make sure there is no circular redirections and throw the Exception it happends.
It would be useful to return the response headers in the thrown exception to better identify the error and take the appropriate steps (this second option could also be useful when we have other HTTP errors such as 401 where the body of the response doesn't always carry as much information).
The text was updated successfully, but these errors were encountered: