Title:
State: RAISED OPEN PENDING POSTPONED SUBSUMED CLOSED
Product: All RDFa Recipes SKOS VM
Raised By: Everyone Abhishek Rungta Alistair Miles Antoine Isaac Ben Adida Bernard Horan Clay Redding Dan Brickley Daniel Maycock Daniel Rubin David Peterson Diego Berrueta Ed Summers Elisa Kendall Fabien Gandon Francesco de Leo Guus Schreiber Jan Henke Jeremy Carroll Jon Phipps Justin Thorp Justin Thorp Manu Sporny Margherita Sini Michael Hausenblas Mirghani Mohamed Quentin Reul Rachel Yager Ralph Swick Sean Bechhofer Siegfried Handschuh Simone Onofri Thomas Baker Vit Novacek
Description: Escape sequences in URIs (such as %20 for whitespaces) must be double-escaped to build a SPARQL query in the implementation of Recipe 6, pattern 2. The issue and a potential solution were raised by Josh Tauberer (2008-01-20): [[[ (...) I ran into a problem when I created some URIs with %20's in them, because the redirect would need to double-escape the %20's when they are put into the query string. After some chin-scratching I found out that mod_rewrite could be used to do a proper redirect, and I've documented it here: http://rdfabout.com/demo/census/htaccess.txt There's more explanation in the link, but the short story is putting into the main httpd.conf: RewriteMap esc int:escape and then into .htaccess: RewriteEngine on RewriteBase "/" RewriteRule ^(rdf/.*) http://%{HTTP_HOST}/sparql? (..all one line..) query=DESCRIBE+ [R] ]]] Source: http://simile.mit.edu/mail/ReadMsg?listName=Linking%20Open%20Data&msgId=23498 [[[ # When we get URIs with %20s or other escaped characters in them, # a simple RedirectMatch won't do because in the query string # DESCRIBE query, the escaped characters will be unescaped at # some point during processing. So this is bad: # # RedirectMatch 303 (/rdf/.*) http://rdfabout.com/sparql?query=DESCRIBE+%3Chttp://www.rdfabout.com$1%3E # # Instead, we need to double-escape the characters: The percent # signs should ultimately be escaped so the processor gets back # the original escaping when unescaping is applied. # # To do this, we need to use mod_rewrite. However, mod_rewrite is # operating on the unescaped URI, so we need the 'escape' mapping # function, which needs to be activated in httpd.conf with: # RewriteMap esc int:escape # The rewrite rule below re-escapes the unescaped URI (getting back # the problematic URL we started with), and then mod_rewrite # escapes it again when it sends the redirect, finally achieving # the double-escape. RewriteEngine on RewriteBase "/" RewriteRule ^(rdf/.*) http://%{HTTP_HOST}/sparql?query=DESCRIBE+ [R] ]]] Source: http://rdfabout.com/demo/census/htaccess.txt
Add notes: