gjhiggins/rdflib — Issue #139: Relative URIs are resolved incorrectly after redirects
Author: gjhiggins
Created: 2011-10-19 01:29:50+00:00
State: open

Originally filed by vfaronov on 2010-09-10T23:23:28

What steps will reproduce the problem?
1. Prepare a resource serving up an RDF description that contains relative URIs, for example <#frag1>.
2. Prepare a resource that redirects (for example, HTTP 301) to .
3. Use RDFLib's Graph.parse() to parse .

What is the expected output? What do you see instead?
I expect the "real" URI to be used as the base URI, giving absolute URIs of the form . Instead, RDFLib uses the original requested URI as the base, giving .

What version of the product are you using? On what operating system?
RDFLib trunk (r1895) on GNU/Linux.

Please provide any additional information below.
RFC 3986 Uniform Resource Identifier (URI): Generic Syntax
http://tools.ietf.org/html/rfc3986#section-5.1.3
"Note that if the retrieval was the result of a redirected request, the last URI used (i.e., the URI that resulted in the actual retrieval of the representation) is the base URI."