Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2015-12-22 18:20:19 +0300
committerMiguel de Icaza <miguel@gnome.org>2015-12-22 18:20:19 +0300
commitccdf8c3274d1793ffeddedfd784d49707feea62a (patch)
treea95973dbaa0703f395b0d34fce3bb21a62bee46f /mcs
parent5c7b6ea2200218f57e4feb657dc2926ca30a31e9 (diff)
parent1d8284ed11b416641ed859e77a23b958c99c84b2 (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.cs9
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);