diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-09-20 10:33:26 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-21 08:18:42 +0200 |
commit | 883cf374d8c30dfa68ed0e6e96d58e9db3f835ac (patch) | |
tree | 31fcddc8baf1fcfd93b93ab31a3cafd31b1f2eb8 /tests/data | |
parent | 68fb593f0dc4ae84b020ebcf5204b1bd48ee2b04 (diff) | |
download | curl-883cf374d8c30dfa68ed0e6e96d58e9db3f835ac.tar.gz |
test897: verify delivery of IMAP post-body header content
The "content" is delivered as "body" by curl, but the envelope continues
after the body and the rest of it should be delivered as header.
The IMAP server can now get 'POSTFETCH' set to include more data to
include after the body and test 897 is done to verify that such "extra"
header data is in fact delivered by curl as header.
Ref: #7284 but fails to reproduce the issue
Closes #7748
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/Makefile.inc | 2 | ||||
-rw-r--r-- | tests/data/test897 | 70 |
2 files changed, 71 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 91b8c18eb..1f774ce4e 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -106,7 +106,7 @@ test854 test855 test856 test857 test858 test859 test860 test861 test862 \ test863 test864 test865 test866 test867 test868 test869 test870 test871 \ test872 test873 test874 test875 test876 test877 test878 test879 test880 \ test881 test882 test883 test884 test885 test886 test887 test888 test889 \ -test890 test891 test892 test893 test894 test895 test896 \ +test890 test891 test892 test893 test894 test895 test896 test897 \ \ test900 test901 test902 test903 test904 test905 test906 test907 test908 \ test909 test910 test911 test912 test913 test914 test915 test916 test917 \ diff --git a/tests/data/test897 b/tests/data/test897 new file mode 100644 index 000000000..1a537ea60 --- /dev/null +++ b/tests/data/test897 @@ -0,0 +1,70 @@ +<testcase> +<info> +<keywords> +IMAP +Clear Text +FETCH +</keywords> +</info> + +# +# Server-side +<reply> +<data> +body
+
+--
+ yours sincerely
+</data> +<servercmd> +POSTFETCH extra stuff sent in the envelope after the body +</servercmd> +</reply> + +# +# Client-side +<client> +<server> +imap +</server> + <name> +IMAP and envelope meta data after body transfer + </name> + <command> +'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=123/;SECTION=1' -u user:secret -D log/head-%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT %TESTNUMBER
+A004 FETCH 123 BODY[1]
+A005 LOGOUT
+</protocol> +<file name="log/head-%TESTNUMBER"> + _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ {| |___
+ \___|\___/|_| \_\_____|
+* OK curl IMAP server ready to serve
+A001 BAD Command
+A002 OK LOGIN completed
+* 172 EXISTS
+* 1 RECENT
+* OK [UNSEEN 12] Message 12 is first unseen
+* OK [UIDVALIDITY 3857529045] UIDs valid
+* OK [UIDNEXT 4392] Predicted next UID
+* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
+* OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
+A003 OK [READ-WRITE] SELECT completed
+* 123 FETCH (BODY[1] {31}
+extra stuff sent in the envelope after the body)
+A004 OK FETCH completed
+</file> +</verify> +</testcase> |