Skip to content

Commit

Permalink
Merge pull request #9 from pdsinterop/multiline
Browse files Browse the repository at this point in the history
Fix for multiline patch requests, fixes #6
  • Loading branch information
ylebre authored Apr 7, 2021
2 parents 6881daf + 55c326a commit 0667b76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ private function handleSparqlUpdate(Response $response, string $path, $contents)
// FIXME: Use enums from namespace Pdsinterop\Rdf\Enum\Format instead of 'turtle'?
// parse query in contents
// FIXME: allow multiline results
// if (preg_match_all("/((INSERT|DELETE).*{(.*)})+/s", $contents, $matches, PREG_SET_ORDER)) {
if (preg_match_all("/((INSERT|DELETE).*{(.*)})+/", $contents, $matches, PREG_SET_ORDER)) {
if (preg_match_all("/((INSERT|DELETE).*{(.*)})+/m", $contents, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$command = $match[2];
$triples = $match[3];
Expand Down

0 comments on commit 0667b76

Please sign in to comment.