Skip to content
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

Bad handling of POST request with content-type application/sparql-query #58

Open
Hibou57 opened this issue Sep 2, 2017 · 3 comments
Open

Comments

@Hibou57
Copy link

Hibou57 commented Sep 2, 2017

When I send a request to /sparql/ with Content-Type: application/sparql-query and the unencoded request as the request body, RedStore erroneously concludes the request is malformed, complaining:

Response: Bad Request - Missing query string.

But with this query form, not query string are required, although there may be some, as stated in 2.1.3 query via POST directly:

[…] Clients may include the optional default-graph-uri and named-graph-uri parameters as HTTP query string parameters in the request URI. […]

@njh
Copy link
Owner

njh commented Sep 2, 2017

Hi,

I have not done any work on RedStore for quite a long time, so I am unlikely to make time to fix this. If you are able to create a Pull Request (ideally with a test), then I will be happy to review it.

Be warned that there also hasn't been a release of Redland since 2013.

nick.

@Hibou57
Copy link
Author

Hibou57 commented Sep 2, 2017

Yah :p , will have a look when I will have time.

But (on the second point) Redland ins't dead, isn’t it? Thanks for the hint anyway, I will care when I will read the W3C references on the covered standards.

@Hibou57
Copy link
Author

Hibou57 commented Sep 2, 2017

4store do the same, just that it returns an HTTP error status and an explanatory response body:

HTTP/1.0 400 4store only implements application/x-www-form-urlencoded
Server: 4s-httpd/fe34829
Content-Type: text/plain; charset=UTF-8

400 4store only implements application/x-www-form-urlencoded
This is a 4store SPARQL server fe34829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants