diff options
author | Miguel de Icaza <miguel@gnome.org> | 2015-12-22 18:20:19 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2015-12-22 18:20:19 +0300 |
commit | ccdf8c3274d1793ffeddedfd784d49707feea62a (patch) | |
tree | a95973dbaa0703f395b0d34fce3bb21a62bee46f /mcs | |
parent | 5c7b6ea2200218f57e4feb657dc2926ca30a31e9 (diff) | |
parent | 1d8284ed11b416641ed859e77a23b958c99c84b2 (diff) |
Merge pull request #1896 from meum/patch-1
Fix dot stuffing in SmtpClient
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System/System.Net.Mail/SmtpClient.cs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs index 69fd3480999..bb6f93a0484 100644 --- a/mcs/class/System/System.Net.Mail/SmtpClient.cs +++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs @@ -794,13 +794,8 @@ namespace System.Net.Mail { CheckCancellation (); if (escapeDots) { - int i; - for (i = 0; i < line.Length; i++) { - if (line[i] != '.') - break; - } - if (i > 0 && i == line.Length) { - line += "."; + if (line.Length > 0 && line[0] == '.') { + line = "." + line; } } writer.Write (line); |