Skip to content
Snippets Groups Projects
Commit 9fdb81a6 authored by alvaro's avatar alvaro
Browse files

Fixed #127

parent 9acdd847
No related branches found
No related tags found
No related merge requests found
...@@ -134,13 +134,15 @@ class Utils{ ...@@ -134,13 +134,15 @@ class Utils{
foreach($a as $v){ foreach($a as $v){
foreach($conf['http_accept'] as $formatTypeArray){ foreach($conf['http_accept'] as $formatTypeArray){
if(strstr($v, ";")){ if(strstr($v, ";")){
$aux = explode(";q=", $v); $aux = explode(";", $v);
$aux[0] = trim($aux[0]);
if(in_array($aux[0], $formatTypeArray)){ if(in_array($aux[0], $formatTypeArray)){
$b[$aux[0]] = $aux[1]; $b[$aux[0]] = floatval(trim(str_replace("q=","",$aux[1])));
} }
}else{ }else{
if(in_array($v, $formatTypeArray)){ $value = trim($v);
$b[$v] = 1; if(in_array($value, $formatTypeArray)){
$b[$value] = 1.0;
} }
} }
} }
......
...@@ -37,7 +37,7 @@ $conf['resource']['url_delimiter'] = "%u"; ...@@ -37,7 +37,7 @@ $conf['resource']['url_delimiter'] = "%u";
$conf['http_accept']['html'] = array('text/html'); $conf['http_accept']['html'] = array('text/html');
$conf['http_accept']['rdf'] = array('application/rdf+xml'); $conf['http_accept']['rdf'] = array('application/rdf+xml');
$conf['http_accept']['ttl'] = array( $conf['http_accept']['ttl'] = array(
'text/n3', 'application/x-turtle', 'application/turtle', 'text/turtle'); 'text/n3', 'application/x-turtle', 'application/turtle', 'text/turtle', 'application/rdf+turtle');
$conf['http_accept']['json'] = array('application/json', 'application/x-javascript', 'text/javascript', 'text/x-javascript', 'text/x-json'); $conf['http_accept']['json'] = array('application/json', 'application/x-javascript', 'text/javascript', 'text/x-javascript', 'text/x-json');
$conf['http_accept']['nt'] = array('text/plain'); $conf['http_accept']['nt'] = array('text/plain');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment