Closed hansidm closed 8 years ago
The content-type detection was a bit wrong, as the check was using "equals" instead of "startsWith". The request that caused the failured contained a content-type like
"application/xxx-blabalbal;charset=UTF-8"
so SolRDF, looking for the only mime-type section, rejected the request as "application/xxx-blabalbal;charset=UTF-8" != "application/xxx-blabalbal" and therefore the requested content type was unknown
The change has been applied also to other kind of requests (this issue is related to a SPARQL query but the same error would happen with UPDATE requests). I also added three unit tests for checking the current behaviour correctness.
In the test package org.gazzax.labs.solrdf.handler.search.handler see
Sparql11SearchHandlerTestCase.queryUsingPOSTWithURLEncodedParameters_II()
Sparql11SearchHandlerTestCase.requestContainsContentType()
Sparql11SearchHandlerTestCase.requestContainsContentType()
@hansidm I'm not closing the issue. Could you please give it a try and (eventually) close it?
I am getting the following error when using YASGUI as a frontend to SolRDF
<?xml version="1.0" encoding="UTF-8"?>
Here are some details of the request sent Params: query:"PREFIX+rdf:+http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX+rdfs:+http://www.w3.org/2000/01/rdf-schema# SELECT+*+WHERE+{ ++?sub+?pred+?obj+. }+ LIMIT+10"
Headers:![headers](https://cloud.githubusercontent.com/assets/11194099/9311256/1030e8a4-44e3-11e5-80ea-b13017c4ad9e.png)