Changeset 588
- Timestamp:
- 11/27/09 09:51:15 (4 months ago)
- Location:
- apps/outlook/branches/1.5/DotTelSystem
- Files:
-
- 6 modified
-
DNS/DNSInputStream.cs (modified) (2 diffs)
-
DNS/Records/DNSUnlinkedTelnameNaptrResourceRecord.cs (modified) (1 diff)
-
Lookup/Cache/CacheUpdater.cs (modified) (1 diff)
-
Lookup/Cache/LookupCache.cs (modified) (1 diff)
-
Lookup/Lookup.cs (modified) (1 diff)
-
Lookup/LookupResult.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/outlook/branches/1.5/DotTelSystem/DNS/DNSInputStream.cs
r577 r588 463 463 return null; 464 464 } 465 try 466 { 467 while (this.Position < end) 468 { 469 txtStr = txtStr + this.ReadString(); 470 } 471 } 472 catch (EndOfStreamException) { } 465 473 return new DNSTxtResourceRecord(ttl, txtStr); 466 474 } … … 521 529 private DNSNInfoResourceRecord ReadNInfo(long rrTTL, int rrDataLen) 522 530 { 523 string txtStr = ReadString(); 531 long end = this.Position + rrDataLen; 532 string txtStr = ""; 533 try 534 { 535 while (this.Position < end) 536 { 537 txtStr = txtStr + this.ReadString(); 538 } 539 } 540 catch (EndOfStreamException) { } 524 541 if (txtStr.Trim() == DNSStructuredKeywordsTxtResourceRecord.TXTTYPE 525 542 || txtStr.Trim() == DNSTxtServiceMessageResourceRecord.TXTTYPE) -
apps/outlook/branches/1.5/DotTelSystem/DNS/Records/DNSUnlinkedTelnameNaptrResourceRecord.cs
r580 r588 84 84 this.serviceType = naptr.ServiceType; 85 85 this.catagories = naptr.Catagories; 86 Logger.Log(Logger.Section.Lookups,"URI Path: " + naptr.UriPath); 86 87 this.uriPath = naptr.UriPath; 88 Logger.Log(Logger.Section.Lookups, "URI Scheme: " + naptr.UriScheme); 87 89 this.uriScheme = naptr.UriScheme; 88 90 this.labels = naptr.Labels; 89 if (this.uriPath.StartsWith(";base64")) 91 string[] split = this.uriPath.Split(new char[] { ',' }, 2); 92 string stuff = split[0]; 93 string txtStr = ""; 94 if (split.Length > 1) 95 { 96 txtStr = split[1]; 97 } 98 else 99 { 100 txtStr = split[0]; 101 } 102 if (stuff == "" || split.Length <= 1 || this.uriScheme != "data:") 103 { 104 this.text = System.Uri.UnescapeDataString(txtStr); 105 this.display = true; 106 } 107 else if (stuff.StartsWith(";base64")) 90 108 { 91 109 System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding(); 92 110 System.Text.Decoder utf8Decode = encoder.GetDecoder(); 93 111 94 byte[] todecode_byte = Convert.FromBase64String(this.uriPath.Substring(8, this.uriPath.Length-8)); 95 int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length); 96 char[] decoded_char = new char[charCount]; 97 utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0); 98 this.text = new string(decoded_char); 99 112 Logger.Log(Logger.Section.Lookups, "Base 64 String to decode: " + txtStr); 113 try 114 { 115 byte[] todecode_byte = Convert.FromBase64String(txtStr); 116 int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length); 117 char[] decoded_char = new char[charCount]; 118 utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0); 119 this.text = new string(decoded_char); 120 if (UriHandler.getInstance().Displayable(this.serviceType, this.uriScheme) || !UriHandler.getInstance().KnownService(this.serviceType)) 121 this.display = true; 122 else 123 this.display = false; 124 } 125 catch (FormatException e) 126 { 127 this.text = txtStr; 128 } 100 129 } 101 130 else 102 131 { 103 if (this.uriScheme.StartsWith("data:")) 104 this.text = this.uriPath.Substring(1, this.uriPath.Length - 1); 105 else 106 this.text = this.uriPath; 132 this.display = false; 107 133 } 108 if (UriHandler.getInstance().Displayable(this.serviceType, this.uriScheme) || !UriHandler.getInstance().KnownService(this.serviceType))109 this.display = true;110 else111 this.display = false;112 134 113 135 } -
apps/outlook/branches/1.5/DotTelSystem/Lookup/Cache/CacheUpdater.cs
r577 r588 128 128 try 129 129 { 130 131 130 string privateTelname = Publishers.Instance.GetPrivateTelname(telname); 132 131 -
apps/outlook/branches/1.5/DotTelSystem/Lookup/Cache/LookupCache.cs
r577 r588 121 121 lock (cache) 122 122 { 123 string privateTelname = Publishers.Instance.GetPrivateTelname(telname); 124 if (cache.ContainsKey(privateTelname)) 125 { 126 return cache[privateTelname]; 123 //Commented out because it is unnecessary 124 //string privateTelname = Publishers.Instance.GetPrivateTelname(telname); 125 if (cache.ContainsKey(telname)) 126 { 127 return cache[telname]; 127 128 } 128 129 } -
apps/outlook/branches/1.5/DotTelSystem/Lookup/Lookup.cs
r577 r588 169 169 } 170 170 completeListener = lc; 171 172 171 string privateTelname = Publishers.Instance.GetPrivateTelname(telname); 173 172 this.PerformLookup(privateTelname, telname); -
apps/outlook/branches/1.5/DotTelSystem/Lookup/LookupResult.cs
r577 r588 148 148 } 149 149 } 150 /// <summary> The keyword records.</summary>151 private System.Collections.ArrayList newKeywordRecords;152 150 153 151 /// <summary> The keyword records.</summary> … … 1088 1086 1089 1087 XmlElement uriElement = doc.CreateElement("Uri"); 1090 uriElement.InnerText = rr.ReplaceStr.Replace("\\", "\\\\");1088 uriElement.InnerText = Uri.UnescapeDataString(rr.Uri).Replace("\\", "\\\\"); 1091 1089 naptrRecord.AppendChild(uriElement); 1092 1090








