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

Fix ignored fetcher timeout attribute for bug #30 of rdflib #31

Merged
merged 1 commit into from Feb 10, 2014

Conversation

Projects
None yet
2 participants
@slorber
Contributor

slorber commented Feb 5, 2014

This has been tested successfully with the following code, both with and without JQuery

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script src="rdflib.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

</head>
<body>


<script>
    function createNewRdfStore() {
        var store = new $rdf.IndexedFormula();
        var fetcherTimeout = 10000;
        $rdf.fetcher(store, fetcherTimeout, true);
        return store;
    }
    var store = createNewRdfStore();


    var urlToFetch = "http://bblfish.net/people/henry/card";
    var urlToFetchTimeout = "http://purl.org/captsolo/semweb/foaf-captsolo.rdf";
    var urlToFetchTimeout2 = "http://unknown.localhost.com";
    var urlToFetchTimeout3 = "https://localhost:8443/srv/cors?url=http://purl.org/captsolo/semweb/foaf-captsolo.rdf";

    store.fetcher.nowOrWhenFetched(urlToFetchTimeout3, undefined, function(isError,errorStatus) {
        console.error("isError?",isError," Status=",errorStatus)
    });

</script>
</body>
</html>

In my case I needed a cors proxy to be able to simulate the timeout because there were errors due to same origin policy.
Btw these errors were not very explicit in errorStatus :(

presbrey added a commit that referenced this pull request Feb 10, 2014

Merge pull request #31 from stample/fix-fetcher-timeout-bug
Fix ignored fetcher timeout attribute for bug #30 of rdflib

@presbrey presbrey merged commit 5739cb0 into linkeddata:master Feb 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment