-
Notifications
You must be signed in to change notification settings - Fork 2
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
Patch seems to be broken. #56
Comments
On closer inspection, I'm not actually able to repeat this. Using the same SPARQL request as pasted above:
Are you able to cook up a failing test? In the meanwhile, I'm going to work on the |
The parser methods used to try to handle Strings, as well as valid Rack inputs. This led to some unnecessary complexity, giving rise to errors like those seen in #56. This refactors to handle only IO-like Rack Input streams. Most of the work here is just to reorganize the tests. There is an odd case where `RDFSource#update` feeds the IO stream before trying to parse a graph. For now, we aggressively `#rewind` the stream in `#parse_graph` to this problem. This might be unduely costly, and there is probably a better fix in the long run.
I think I have this fixed thoroughly in #59. Thanks for the issue report! I'll get a release with the changes out later today. |
Thanks for your quick reaction! I will check out the fix. I wonder why we got different behavior. |
patch
methods inRDFSource
andContainer
pass aRack::Lint::InputWrapper
object to eitherLD::Patch.parse
orSPARQL.execute
depending on the Content-Type. These methods don't supportRack::Lint::InputWrapper
, and both fail to execute the valid queries properly.LD Patch requests have no effect on the resource graph (while they should), and SPARQL Update requests cause the following error.
Where
/home/user/example_patch_sparql.txt
has the following content:Simply passing
env['rack.input'].read
instead ofenv['rack.input']
seems to resolve the issue, since both methods support strings.The text was updated successfully, but these errors were encountered: