Closed Bug 23351 Opened 25 years ago Closed 25 years ago

bug processing partial multi-line responses

Categories

(MailNews Core :: Networking, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bns_robson, Assigned: mscott)

Details

(Whiteboard: PATCH ATTACHED)

Attachments

(1 file)

I am using a mail server (MDaemon) which seems to delay between sending the
lines of the multi-line response it sends in response to the EHLO line from
Mozilla.

This leads to Mozilla failing when I attempt to send a message as it attempts
to process the response from the SMTP server after the first line of the
multi-line response has been received but before the last line has been
received.

What happens is
1) nsSmtpProtocol::ProcessProtocolState is called when the first line is
   received. This immediately clears the SMTP_PAUSE_FOR_READ flag.
2) nsSmtpProtocol::SmtpResponse is then called.
3) It calls nsSmtpProtocol::ReadLine which reads a line (the first line of
   the multiple line response) and then returns.
4) nsSmtpProtocol::SmtpResponse detects this is the first line of a multiple
   line response and then returns.
5) Due to the loop in nsSmtpProtocol::ProcessProtocolState,
   nsSmtpProtocol::SmtpResponse is called again.
6) It calls nsSmtpProtocol::ReadLine but there is no data available as the
   second line has not yet been received. It returns without reading anything.
7) nsSmtpProtocol::SmtpResponse gives an error as 0 was returned as the number
   of bytes read.
Attached patch Suggested PatchSplinter Review
Priority: P3 → P1
Whiteboard: PATCH ATTACHED
changed status whiteboard to PATCH ATTACHED and also set Priority to P1 now I
have a suggested patch to be considered.
Status: NEW → ASSIGNED
Target Milestone: M13
Thanks for the patch. It looks good to me. I'll start running with it and if I
don't see any problems I'll check it in in a day or two.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I check in your patch. Thanks again for submitting it.
                                                                                
bns_robson@hotmail.com - is this fixed ok for you now?
Per Bruce via email to me:  "Yes. It has been since the change was made in Jan
2000."

Marking verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: