W3C home > Mailing lists > Public > public-dxwg-wg@w3.org > September 2019

Re: [dxwg] Specify the realisation order of precedence for conflicting profile negotiation situations (#505)

From: Nicholas Car via GitHub <sysbot+gh@w3.org>
Date: Thu, 19 Sep 2019 11:48:21 +0000
To: public-dxwg-wg@w3.org
Message-ID: <issue_comment.created-533094251-1568893700-sysbot+gh@w3.org>
I think @larsgsvensson is correct with the statement about what Apache etc. could implement. 

I've configured many Apache servers for conneg, both for local file systems (conneg to serve HTML or RDF from different files, for example) and also as proxies to applications written in Python or applications on whole other servers. In those cases, Apache is just acting as a pass-through splitting requests, usually, on some path segment. The pass-through must convey all relevant Headers & QSAa to the application which then handles the response. 

I do use Apache to funnel multiple possible ways of requesting a resource using conneg into a single way that an application understands though in on server's case. e.g.:

RewriteCond %{QUERY_STRING} ^_format=text/turtle$ [OR]
RewriteCond %{HTTP:Accept} text/turtle [NC]
RewriteRule ^/dataset/asgs2011/(.*)/$                   http://asgsld.net/2011/$1/?_format=text/turtle [R=302,L]
RewriteRule ^/dataset/asgs2011/(.*)/index.ttl$          http://asgsld.net/2011/$1/?_format=text/turtle [R=302,L]
RewriteRule ^/dataset/asgs2011/(.*)/$                   http://asgsld.net/2011/$1/ [R=302,L]
So here you can request Turtle by either using the QSA _format=text/turtle or Accept: text/turtle or .ttl at the end of the resource. All result in a call to the Application of <resource-uri>?_format=text/turtle since the application can only handle QSAs.

So logic similar to this in Apache could be used by developers for Conneg by P.

GitHub Notification of comment by nicholascar
Please view or discuss this issue at https://github.com/w3c/dxwg/issues/505#issuecomment-533094251 using your GitHub account
Received on Thursday, 19 September 2019 11:48:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:42:20 UTC