Browse files

Fixed the issue with DESCRIBE where it wasn't returning the appropria…

…te format

when an accept header is sent
  • Loading branch information...
1 parent 3feb1bf commit d937fff62993ee40eadc254b303dba66a2eed713 @mischat mischat committed Nov 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/http/httpd.c
View
4 src/http/httpd.c
@@ -381,11 +381,11 @@ static void http_query_worker(gpointer data, gpointer user_data)
if (ctxt->output) {
type = ctxt->output;
- } else if (ctxt->qr->construct && accept && strstr(accept, "text/turtle")) {
+ } else if ((ctxt->qr->construct || ctxt->qr->describe) && accept && strstr(accept, "text/turtle")) {
type = "text";
fprintf(fp, "Content-Type: text/turtle\r\n\r\n");
flags = 0;
- } else if (ctxt->qr->construct && accept && strstr(accept, "application/rdf+xml")) {
+ } else if ((ctxt->qr->construct || ctxt->qr->describe) && accept && strstr(accept, "application/rdf+xml")) {
type = "sparql";
} else if (accept && strstr(accept, "application/sparql-results+xml")) {
type = "sparql";

0 comments on commit d937fff

Please sign in to comment.