Commit 905db5d2 authored by Frank Bergmann's avatar Frank Bergmann

Rest: im_rest_error now returns the passed HTTP status code (304, 4xx, 5xx)...

Rest: im_rest_error now returns the passed HTTP status code (304, 4xx, 5xx) which was ignored previously
parent 528126e9
......@@ -612,7 +612,7 @@ ad_proc -public im_rest_error {
switch $format {
html {
doc_return 200 "text/html" "
doc_return $http_status "text/html" "
[im_header $page_title [im_rest_header_extra_stuff]][im_navbar]
<p>$status_message</p>
<pre>[ns_quotehtml $message]</pre>
......@@ -621,13 +621,14 @@ ad_proc -public im_rest_error {
}
json {
set result "{\"success\": false,\n\"message\": \"[im_quotejson $message]\"\n}"
doc_return 200 "application/json" $result
doc_return $http_status "application/json" $result
}
default {
ad_return_complaint 1 "Invalid format1: '$format'"
}
}
ns_log Notice "im_rest_error: before ad_script_abort"
ad_script_abort
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment