easyrdf icon indicating copy to clipboard operation
easyrdf copied to clipboard

Graph Store protocol: insert() waits forever

Open indeyets opened this issue 12 years ago • 2 comments

I have a usecase (inserting data via GraphStore protocol into StarDog 2.0 triplestore) in which EasyRDF just waits forever in fgets on this line:

https://github.com/njh/easyrdf/blob/master/lib/EasyRdf/Http/Client.php#L448

debug-annotated code

           // Read in the response
            $content = '';
            while (!feof($socket)) {
                echo "reading\n";
                $content .= fgets($socket);
                echo "is it feof?\n";
            }
            echo "EOF\n";

output:

reading
is it feof?
reading
is it feof?
reading
is it feof?
reading
is it feof?
reading
is it feof?
reading

command-line curl handles this case just fine

I wonder if it is related to "100 Continue" support requested here

indeyets avatar Oct 08 '13 13:10 indeyets

Solution might probably be delayed until #133 is implemented as trivial Guzzle-based client does the work perfectly

https://gist.github.com/indeyets/6886193

indeyets avatar Oct 08 '13 15:10 indeyets

Writing a Guzzle adaptor should be fairly easy - probably worth providing it as an alternative prior to replacing the existing client completely.

njh avatar Oct 08 '13 16:10 njh