summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2020-02-05 16:48:43 +0000
committerGitHub <noreply@github.com>2020-02-05 16:48:43 +0000
commitc3a839416dff565bcfe96d740d9155c756f5e525 (patch)
tree209ec40c20eed71ac08ee4c09979a88657f0ee46
parent150e056af06c3954262d880600c23eae852c95eb (diff)
parent8d82414fb9684cfdff2f9cdca0a708f42f77458c (diff)
downloadcouchdb-c3a839416dff565bcfe96d740d9155c756f5e525.tar.gz
Merge pull request #2521 from apache/fix-2520
Fix highlight_post_tag parsing from json request body
-rw-r--r--src/dreyfus/src/dreyfus_httpd.erl2
-rw-r--r--test/javascript/tests/view_errors.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/dreyfus/src/dreyfus_httpd.erl b/src/dreyfus/src/dreyfus_httpd.erl
index e9851639b..346f5ede6 100644
--- a/src/dreyfus/src/dreyfus_httpd.erl
+++ b/src/dreyfus/src/dreyfus_httpd.erl
@@ -344,7 +344,7 @@ parse_json_index_param(<<"highlight_fields">>, Value) ->
[{highlight_fields, Value}];
parse_json_index_param(<<"highlight_pre_tag">>, Value) ->
[{highlight_pre_tag, Value}];
-parse_json_index_param(<<"highlight_pos_tag">>, Value) ->
+parse_json_index_param(<<"highlight_post_tag">>, Value) ->
[{highlight_post_tag, Value}];
parse_json_index_param(<<"highlight_number">>, Value) ->
[{highlight_number, parse_positive_int_param2("highlight_number", Value)}];
diff --git a/test/javascript/tests/view_errors.js b/test/javascript/tests/view_errors.js
index f135b749a..7aad40c9a 100644
--- a/test/javascript/tests/view_errors.js
+++ b/test/javascript/tests/view_errors.js
@@ -154,6 +154,7 @@ couchTests.view_errors = function(debug) {
db.view("infinite/infinite_loop");
T(0 == 1);
} catch(e) {
+ console.log("infinite sorrow: " + e.error);
T(e.error == "os_process_error");
}