mirror of
https://github.com/curl/curl.git
synced 2026-04-16 01:25:14 +08:00
SMTP automatically appends a \n.\n to an upload if there is not already one at the end of the input. The implementation had a bug where this did not happen, depending on read size and buffering. Change test 900 to reproduce the failure. The bug only happened for mail body input of known length, where EOS was known on the last chunk read. Change test 900 to use an input file and make it large enough. Fixes #18798 Closes #19193 Reported-by: madoe on github
56 lines
718 B
Plaintext
56 lines
718 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
SMTP
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
smtp
|
|
</server>
|
|
<name>
|
|
SMTP
|
|
</name>
|
|
<file name="%LOGDIR/mail%TESTNUMBER">
|
|
From: different
|
|
To: another
|
|
|
|
body
|
|
%repeat[6553 x 0123456789]%
|
|
</file>
|
|
|
|
<command>
|
|
smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T %LOGDIR/mail%TESTNUMBER
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
EHLO %TESTNUMBER
|
|
MAIL FROM:<sender@example.com>
|
|
RCPT TO:<recipient@example.com>
|
|
DATA
|
|
QUIT
|
|
</protocol>
|
|
<upload>
|
|
From: different
|
|
To: another
|
|
|
|
body
|
|
%repeat[6553 x 0123456789]%
|
|
|
|
.
|
|
</upload>
|
|
</verify>
|
|
</testcase>
|