commit adc33ebe60bb4af53866381d635b457fc77c302f
Author: Pete Zaitcev <zaitcev(a)redhat.com>
Date: Thu Apr 14 22:30:18 2011 -0600
emit valid JSON for the root
Add a "providers": tag before the array of provider information.
With this patch, the GET on root returns valid JSON.
Reported by Dave Johnson.
* NEWS (Bug fixes): Mention it.
NEWS | 6 ++++++
t/basic | 1 +
template.c | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 31f2371..1e901a8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ iwhd NEWS -*- outline
-*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ iwhd now emits syntactically valid JSON output for the root query.
+ Before, it omitted the "providers": tag before the list of
+ provider descriptions. [bug introduced in the beginning]
+
* Noteworthy changes in release 0.93 (2011-04-08) [stable]
diff --git a/t/basic b/t/basic
index 7dcf10b..dfe28cd 100644
--- a/t/basic
+++ b/t/basic
@@ -40,6 +40,7 @@ cat <<EOF > root.json || framework_failure_
{
"service": "image_warehouse",
"version": "$VERSION",
+ "providers":
[
{
"rel": "bucket_factory",
diff --git a/template.c b/template.c
index 5eb51ed..5d89b6c 100644
--- a/template.c
+++ b/template.c
@@ -108,6 +108,7 @@ static const char json_root_header[] = "\
{\n\
\"service\": \"%s\",\n\
\"version\": \"%s\",\n\
+ \"providers\":\n\
[\
";
Show replies by date