patch 9.0.1673: cannot produce a status 418 or 503 message

Problem:    Cannot produce a status 418 or 503 message.
Solution:   Add err_teapot().
This commit is contained in:
Bram Moolenaar
2023-07-07 18:57:40 +01:00
parent d392a74c5a
commit 80adaa8ae8
5 changed files with 67 additions and 0 deletions
+9
View File
@@ -154,6 +154,7 @@ digraph_getlist([{listall}]) List get all |digraph|s
digraph_set({chars}, {digraph}) Boolean register |digraph|
digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
echoraw({expr}) none output {expr} as-is
err_teapot() Number produce error 418
empty({expr}) Number |TRUE| if {expr} is empty
environ() Dict return environment variables
escape({string}, {chars}) String escape {chars} in {string} with '\'
@@ -2176,6 +2177,14 @@ echoraw({string}) *echoraw()*
< Use with care, you can mess up the terminal this way.
err_teapot([{expr}]) *err_teapot()*
Produce an error with number 418, needed for implementation of
RFC 2325.
If {expr} is present and it is TRUE error 503 is given,
indicating that coffee is temporarily not available.
If {expr} is present it must be a String.
empty({expr}) *empty()*
Return the Number 1 if {expr} is empty, zero otherwise.
- A |List| or |Dictionary| is empty when it does not have any