Index: owhttpd_dir.c
===================================================================
RCS file: /cvsroot/owfs/owfs/module/owhttpd/src/c/owhttpd_dir.c,v
retrieving revision 1.21
diff -u -r1.21 owhttpd_dir.c
--- owhttpd_dir.c	4 Nov 2011 01:53:12 -0000	1.21
+++ owhttpd_dir.c	8 May 2013 09:56:16 -0000
@@ -156,7 +156,7 @@
 
 static void ShowDirJson(FILE * out, struct parsedname * pn)
 {
-	HTTPstart(out, "200 OK", ct_text);
+	HTTPstart(out, "200 OK", ct_json);
 
 	fprintf(out, "{" );
 	FS_dir(ShowDirJsonCallback, out, pn);
Index: owhttpd_handler.c
===================================================================
RCS file: /cvsroot/owfs/owfs/module/owhttpd/src/c/owhttpd_handler.c,v
retrieving revision 1.99
diff -u -r1.99 owhttpd_handler.c
--- owhttpd_handler.c	9 Oct 2012 01:37:23 -0000	1.99
+++ owhttpd_handler.c	8 May 2013 09:56:16 -0000
@@ -340,7 +340,7 @@
 		HTTPstart(out, "400 Bad Request", ct_text);
 		fprintf(out, "400 Bad request");
 	} else if ( pn->state & ePS_json ) {
-		HTTPstart(out, "400 Bad Request", ct_text);
+		HTTPstart(out, "400 Bad Request", ct_json);
 		fprintf(out, "null");
 	} else {
 		HTTPstart(out, "400 Bad Request", ct_html);
@@ -362,7 +362,7 @@
 		HTTPstart(out, "404 Not Found", ct_text);
 		fprintf(out, "404 Not Found");
 	} else if ( pn->state & ePS_json ) {
-		HTTPstart(out, "404 Not Found", ct_text);
+		HTTPstart(out, "404 Not Found", ct_json);
 		fprintf(out, "null");
 	} else {
 		HTTPstart(out, "404 Not Found", ct_html);
Index: owhttpd_present.c
===================================================================
RCS file: /cvsroot/owfs/owfs/module/owhttpd/src/c/owhttpd_present.c,v
retrieving revision 1.15
diff -u -r1.15 owhttpd_present.c
--- owhttpd_present.c	31 May 2012 01:26:16 -0000	1.15
+++ owhttpd_present.c	8 May 2013 09:56:16 -0000
@@ -41,6 +41,9 @@
 	case ct_text:
 		fprintf(out, "Content-Type: text/plain\r\n");
 		break ;
+	case ct_json:
+		fprintf(out, "Content-Type: application/json\r\n");
+		break ;
 	}
 	fprintf(out, "\r\n");
 }
Index: owhttpd_read.c
===================================================================
RCS file: /cvsroot/owfs/owfs/module/owhttpd/src/c/owhttpd_read.c,v
retrieving revision 1.51
diff -u -r1.51 owhttpd_read.c
--- owhttpd_read.c	5 Nov 2011 00:44:42 -0000	1.51
+++ owhttpd_read.c	8 May 2013 09:56:17 -0000
@@ -620,7 +620,7 @@
 
 static void ShowDeviceJson(FILE * out, struct parsedname *pn)
 {
-	HTTPstart(out, "200 OK", ct_text);
+	HTTPstart(out, "200 OK", ct_json);
 
 	if (pn->selected_filetype == NO_DEVICE) {	/* whole device */
 		fprintf(out, "{\n" ) ;
