Added test and fix for #81960
[mono.git] / mcs / class / System / System / ChangeLog
1 2007-07-06  Alan McGovern  <amcgovern@novell.com>
2
3         * Uri.cs : The URI string should be whitespace trimmed before
4         parsing. The original string is untouched. Fixes #81960.
5
6 2007-07-06  Atsushi Enomoto  <atsushi@ximian.com>
7
8         * UriIdnScope.cs : new file (for net_2_1 profile).
9
10 2007-06-30  Miguel de Icaza  <miguel@novell.com>
11
12         * Uri.cs (GetLeftPart): If the URI is relative this method throws
13         InvalidOperationException. 
14
15         (ToString): do not use GetLeftPart here, instead escape the path. 
16
17         (Parse): For relative uris, keep the string as the path.
18
19 2007-06-30  Gert Driesen  <drieseng@users.sourceforge.net>
20
21         * Uri.cs: Canonicalize is only obsolete from 2.0 onward. Fixed line
22         endings.
23
24 2007-04-18  Igor Zelmanovich  <igorz@mainsoft.com>
25
26         * Uri.cs: added MonoNotSupported attributes.
27
28 2007-04-16  Atsushi Enomoto  <atsushi@ximian.com>
29
30         * Uri.cs : in Uri(baseUri,relativeUri,noEscape), relativeUri could
31           contain a URI scheme. In such cases the relativeUri could be still
32           relative (i.e. not always equivalent to absolute). Fixed bug #81382.
33
34 2007-03-05  Peter Dettman  <peter.dettman@iinet.net.au>
35
36         * Uri.cs: This patch straightens out Equals/GetHashCode for the
37         Uri class: 
38
39         - GetHashCode gives sensible values for relative Uri's.
40         - Uri's that compare equal will give same hashcode.  
41         - operator == now uses Equals.
42
43         All existing tests still pass, and I have added some extra test
44         cases specifically for Equals/GetHashCode on relative Uri's
45         (included in patch).
46
47 2007-01-22  Miguel de Icaza  <miguel@novell.com>
48
49         * Uri.cs (MakeRelativeUri): implement, copy most of the code from
50         MakeRelative. 
51         
52         (EscapeUriString, EscapeDataString): Implement stuff
53         needed by apps in Moma.
54
55 2006-12-07  Vladimir Krasnov  <vladimirk@mainsoft.com>
56
57         * Uri.cs: implemented UnescapeDataString method
58
59 2006-09-28  Andrew Skiba  <andrews@mainsoft.com>
60
61         * UriParser.cs: TARGET_JVM
62         * UriFormatException.cs: MonoTODO
63
64 2006-08-01  Atsushi Enomoto  <atsushi@ximian.com>
65
66         * Uri.cs : don't compare UserInfo in Equals() and op_Equality().
67           Fixed a bug commented in #78799.
68
69 2006-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
70
71         * Uri.cs: update Obsolete msg.
72
73 2006-06-05  Atsushi Enomoto  <atsushi@ximian.com>
74
75         * Uri.cs : revert the previous change as it caused UriTest.
76           Constructors(#rel2a). ToString() for SourceString should be
77           enough for lame users.
78
79 2006-05-13  Atsushi Enomoto  <atsushi@ximian.com>
80
81         * Uri.cs : sometimes OriginalString was null. Fixed bug #78374.
82           Actually this property is LAMESPEC. Never use it.
83
84 2006-04-28  Atsushi Enomoto  <atsushi@ximian.com>
85
86         * Uri.cs : Patch by pawel.sakowski@mind-breeze.com (bug #77382).
87           Reduce object allocation and avoid culture-sensitive comparison.
88
89 2006-03-11  Miguel de Icaza  <miguel@novell.com>
90
91         * Uri.cs: Pragma disable warning 612 (Obsolete methods are being
92         used by us internally).
93
94         Ponder: should we instead move our methods to use new versions of
95         the Obsoleted ones?
96
97 2006-02-21  Atsushi Enomoto  <atsushi@ximian.com>
98
99         * Uri.cs : seems like Uri opreator == and != are case sensitive.
100
101 2006-02-19  Raja R Harinath  <harinath@gmail.com>
102
103         * Uri.cs (InternalEquals): New helper.
104         (Equals, operator ==): Use it.
105         (operator !=): Likewise.  Fix to actually compare operands.
106
107 2006-02-14  Atsushi Enomoto  <atsushi@ximian.com>
108
109         * Uri.cs : implemented op_Equality and op_Inequality.
110
111 2006-02-14  Ankit Jain  <jankit@novell.com>
112
113         * Uri.cs (Uri.EnsureAbsoluteUri): New. Throws exception if its not an
114         absolute uri.
115         (Uri.Parse): Set isAbsoluteUri to false, if the address is not absolute.
116         All properties other than OriginalString, IsAbsoluteUri & UserEscaped
117         throw exception for relative address.
118
119 2005-11-25  Sebastien Pouliot  <sebastien@ximian.com> 
120
121         * DefaultUriParser.cs: Added an internal default parser because (a)
122         UriParser is abstract and (b) MS doesn't always use the new parser
123         classes :(
124         * Uri.cs: Implemented Compare method. Added some FIXME.
125         * UriParser.cs: Implemented GetComponents and IsBaseOf methods. 
126         Changed parsers to point to the new DefaultUriParser.
127
128 2005-11-15  Sebastien Pouliot  <sebastien@ximian.com> 
129  
130         * Uri.cs: Temporary fix for monodoc (which current Uri system won't
131         work under 2.0).
132
133 2005-11-15  Sebastien Pouliot  <sebastien@ximian.com>
134
135         * FileStyleUriParser.cs: New. 2.0 Uri parser class.
136         * FtpStyleUriParser.cs: New. 2.0 Uri parser class.
137         * GenericUriParser.cs: New. 2.0 Uri parser class.
138         * GopherStyleUriParser.cs: New. 2.0 Uri parser class.
139         * HttpStyleUriParser.cs: New. 2.0 Uri parser class.
140         * LdapStyleUriParser.cs: New. 2.0 Uri parser class.
141         * NetPipeStyleUriParser.cs: New. 2.0 Uri parser class.
142         * NetTcpStyleUriParser.cs: New. 2.0 Uri parser class.
143         * NewsStyleUriParser.cs: New. 2.0 Uri parser class.
144         * Uri.cs: Lots of small fixes for both 1.x and 2.0. Some *big* bugs
145         in 1.x (fixed in 2.0) aren't fixed for Mono (and probably never will).
146         This class still needs to be refactored to be usable with the new
147         parsers.
148         * UriParser.cs: New. 2.0 Uri parser base class.
149
150 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
151
152         * Uri.cs : Unescape(string,bool) should also handle % and ?.
153           In ToString(), unescape query part as well. Fixed bug #76643.
154
155 2005-10-21  Atsushi Enomoto  <atsushi@ximian.com>
156
157         * UriBuilder.cs : ToString() should not add duplicate '/' before path.
158           Fixed bug #76501. Patch by Hubert Fongarnand + modified a bit.
159
160 2005-10-18  Sebastien Pouliot  <sebastien@ximian.com>
161
162         * UriTypeConverter.cs: New. Implemented (2.0).
163
164 2005-10-17  Sebastien Pouliot  <sebastien@ximian.com>
165
166         * GenericUriParserOptions.cs: New. 2.0 enum.
167         * UriBuilder.cs: Port == -1 is valid (default) in 2.0. Default name
168         is "localhhost" (not loopback) in 2.0. Fixed case where the Password
169         property could be null (instead of String.Empty).
170         * UriComponents.cs: New. 2.0 enum.
171         * UriFormat.cs: New. 2.0 enum.
172         * UriFormatException.cs: Added comments about GetObjectData.
173         * UriKind.cs: New. 2.0 enum.
174         * UriPartial.cs: Added Query value for 2.0.
175
176 2005-08-16  Daniel Drake  <dsd@gentoo.org>
177
178         * Uri.cs: Various parsing fixes from bug #75144.
179
180 2005-07-09  Gert Driesen  <drieseng@users.sourceforge.net>
181
182         * Uri.cs: Modified fix for bug #71053 to match both MS.NET 1.x and
183         2.0 behaviour. Parse method is no longer used on MS.NET 2.0, marked 
184         obsolete.
185
186 2005-07-09  Gert Driesen  <drieseng@users.sourceforge.net>
187
188         * Uri.cs: in .NET 2.0, port number should be valid UInt16 instead of
189         UInt32. If outcome of parsing is -1, do not consider this to be the
190         default port.
191
192 2005-07-08  Daniel Drake  <dsd@gentoo.org>
193
194         * Uri.cs: Allow descent multiple times below root. Fixes bug #71053.
195
196 2005-07-02  Daniel Drake  <dsd@gentoo.org>
197
198         * Uri.cs: HexUnescape() should only work on single-byte escape
199         sequences, ala HexEscape(). However, we still want to handle multi-byte
200         sequences internally, so introduce a more correct implementation of
201         multi-byte unescaping, HexUnescapeMultiByte(). Fixes bug #74872.
202
203 2005-06-11 Gert Driesen <drieseng@users.sourceforge.net>
204
205         * Uri.cs: Domain address might have trailing period to indicate
206         that the domain name is fully qualified. Fixes bug #75230.
207
208 2005-06-02 Gert Driesen <drieseng@users.sourceforge.net>
209
210         * Uri.cs: throw UriFormatException if URI starts with colon.
211         Fixed bug #75124.
212
213 2005-05-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
214
215         * Uri.cs:
216         (EscapeString): no need to turn the string into a char[] when calling
217         GetBytes.
218
219 2005-03-20 Joshua Tauberer <tauberer@for.net>
220
221         * Uri.cs: Some pedantic changes to the text of a few exceptions.
222
223 2005-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
224
225         * Uri.cs: when unescaping in stages, handle the case when the next
226         substring is not a escaped sequence or the string ends. Fixes bug
227         #73316.
228
229 2005-01-20  Miguel de Icaza  <miguel@ximian.com>
230
231         * Uri.cs: Set the UriSchemNews port default to 119 as well.
232         Fixes bug #71050.
233
234         When dealing with fragments use the `dontEscape' flag passed to
235         the Uri constructor to decide whether the fragment must or must
236         not be escaped, fixes 71051.
237
238 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
239
240         * Uri.cs : Such ctor arg string that starts with "//" should be 
241           regarded as a local file path that will be condensed to single "/",
242           so handle such path differently under Windows and under *nix.
243           Since '\\' is a valid path character on Unix, so we should not
244           replace it with '/' in LocalPath.
245
246 2004-06-17  Jackson Harper  <jackson@ximian.com>
247
248         * Uri.cs: Use invariant culture.
249         
250 2004-06-16  Atsushi Enomoto  <atsushi@ximian.com>
251
252         * Uri.cs : Fixed LocalPath. In that condition, path is always UNC.
253
254 2004-06-16  Atsushi Enomoto  <atsushi@ximian.com>
255
256         * Uri.cs : Reimplemented HexUnescape() (It was too broken to handle
257           multi-byte utf-8 characters.)
258
259 2004-06-11  Atsushi Enomoto  <atsushi@ximian.com>
260
261         * Uri.cs :
262           - We don't have to mind '\\'.
263           - Fixed bug #58301. When path starts with "///" and not more than
264             "////" and not "///*:", handle it as unix path and set Host as
265             empty string. In absolute path case, port should not be parsed
266             and LocalPath should start with '/'.
267           - Handle fragment in prior to path. 
268
269 2004-06-11  Atsushi Enomoto  <atsushi@ximian.com>
270
271         * Uri.cs : Handle Windows UNC. Now we could simplify Parse(). Don't
272           escape windows path twice. Check scheme name as defined in RFC2396.
273
274 2004-06-11  Atsushi Enomoto  <atsushi@ximian.com>
275
276         * Uri.cs : Reverted some changes. '#' should be handled when the input
277           string is NOT raw file path. So handle raw file paths differently.
278           (right now except for Windows UNC).
279           Cache LocalPath and don't compute every time.
280
281 2004-06-10  Atsushi Enomoto  <atsushi@ximian.com>
282
283         * Uri.cs : Don't escape '#' in file URI paths. This fixes bug #47691.
284           Some code simplification.
285
286 2004-06-09  Atsushi Enomoto  <atsushi@ximian.com>
287
288         * Uri.cs : 
289           - Now Parse() is properly implemented. If overriden, the overriding
290             Parse() is used _instead of_ this class's parsing logic.
291           - AbsoluteUri does not escape URI string at all.
292           - ToString() should unescape Query. But should not unescape fragment.
293             And all all parts should be unescaped individually to keep ? and #.
294           - In relative .ctor(), handle Windows UNC as an absolute file URI.
295           - In some cases, hosts and paths were not properly escaped in
296             relative .ctor().
297           - Removed unused isWindowsPath.
298           - Escape Query.
299         * UriBuilder.cs : Fragment and Query aren't escaped when they are set.
300
301 2004-05-12  Dick Porter  <dick@ximian.com>
302
303         * Uri.cs: Reduce(string) is not in the public API.
304
305 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
306
307         * UriBuilder.cs: ignore empty Query. Fixes bug #57082.
308
309 2004-03-21  Jackson Harper  <jackson@ximian.com>
310
311         * Uri.cs: Equals should be case insensitive for all parts except
312         the path.
313
314 2004-02-11  Jackson Harper  <jackson@ximian.com>
315
316         * Uri.cs: If we are sure we have a windows path use \ instead of
317         / for directory separating.
318         
319 2004-02-11  Jackson Harper  <jackson@ximian.com>
320
321         * Uri.cs: If the relative uri passed to Uri (base_uri,
322         relative_uri) is an absolute uri do not combine the uris. The base
323         uri is dropped.
324         
325 2004-02-10  Jackson Harper  <jackson@ximian.com>
326
327         * Uri.cs: Preserve the trailing / if there is one when reducing
328         paths.
329         
330 2004-02-08  Jackson Harper  <jackson@ximian.com>
331
332         * Uri.cs: IsLoopback has different behavoir then
333         IPAddress::IsLoopback. It will only return true for ipv4 addresses
334         if they are 127.0.0.1, localhost, or loopback. 
335         
336 2004-02-06  Jackson Harper  <jackson@ximian.com>
337
338         * Uri.cs: Do not escape querys or fragements. Only reduce certain
339         schemes.
340         
341 2004-02-06  Jackson Harper  <jackson@ximian.com>
342
343         * Uri.cs: Use UTF8 characters when escaping. Reduce paths. This
344         method is taken from System.Web.Utils.UrlUtils.
345         * UriBuilder.cs: Do not escape fragments or queries, but do a utf8
346         switch on them. Do not prepend a "/" to Paths. Do not use
347         IPEndPoint to determine if a port is valid, UriBuilder allows
348         ports to be any positive integer, IPEndPoint does not. Use the
349         ToString () method for generate a uri in get_Uri. Only set the
350         port in ToString () if it is greater then 0.
351         
352 2004-02-05  Jackson Harper  <jackson@ximian.com>
353
354         * UriBuilder.cs: Do not call Uri::ToString for uri builders
355         ToString. UriBuilder's ToString is a little more primitive.
356         
357 2004-01-12  Atsushi Enomoto  <atsushi@ximian.com>
358
359         * Uri.cs : should not escape already-escaped string (Patch by 
360           Boris Kirzner).  File LocalPath should unespace return value.
361           ToString() should be unescaped only when it is not an UNC path.
362           (UNC looks not to be unescaped).
363
364 2004-01-06  Atsushi Enomoto  <atsushi@ximian.com>
365
366         * Uri.cs : quick fix on local file relative uri.
367
368 2004-01-06  Atsushi Enomoto  <atsushi@ximian.com>
369
370         * Uri.cs : Fixed Parse(). Should not allow relative URIs.
371
372 2004-01-05  Atsushi Enomoto  <atsushi@ximian.com>
373
374         * Uri.cs : fixed IsBadFileSystemCharacter() to reject more characters
375           based on MS.NET experiment.
376
377 2003-12-08  Atsushi Enomoto  <atsushi@ximian.com>
378
379         * Uri.cs : more fixes. More presice UNC handling, opaque part 
380           handling for non-standard uri (e.g. urn:go-mono.com), ToString()
381           fix (that returns AbsoluteUri, which is not escaped any more),
382           and so on.
383
384 2003-12-08  Atsushi Enomoto  <atsushi@ximian.com>
385
386         * Uri.cs : Several fixes, including Unc problem, Host and LocalPath
387           fixes, null reference check for .ctor(Uri, string). This fixes
388           bug #51844.
389
390 2003-12-04  John Luke  <jluke@cfl.rr.com>
391         
392         * Uri.cs: applied patch from Chris Masters <neeeeeep@bigpond.com>
393         fixes bug #51510.  ftp uses port 21, https uses 443 and 
394         parse the host name properly for UNC path.
395         
396 2003-10-10  Pedro Martínez Juliá  <yoros@wanadoo.es>
397
398         * Uri.cs: fixed a problem with some URIs like file://some_file.txt
399         It used to return "/some_file.txt/" instead of "some_file.txt" in
400         LocalPath. Fix handling of full path files and SMB addresses.
401
402 2003-08-12  Duncan Mak  <duncan@ximian.com>
403
404         * Uri.cs (constructor): Properly implement RFC 2396, Par. 5.2,
405         part 6a, which says:
406         
407                 In other words, any characters after the last (right-most)
408                 slash character, if any, are excluded.
409
410         Previously, when merging "a://foo.com/foo" with "bar", we yield
411         the result "a://foo.com/foobar", instead of the correct
412         "a://foo.com/bar".
413
414         This fixes bug #45614.
415
416 2003-07-27  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
417
418         * SRDescriptionAttribute.cs: Moved from System.Diagnostics directory
419
420 2003-07-18  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
421
422         * Uri.cs: Added MonoTODO'd members, implemented member, fixed signature
423
424 2003-05-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
425
426         * TempFileCollection.cs: fixed the build under windows.
427         
428 2003-05-07  Ben Maurer <bmaurer@users.sourceforge.net>
429         * Uri.cs: Checked in code to fix bug #41998. Some
430         code from Ian MacLean.
431         
432 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
433
434         * Uri.cs: reworked Segment. Small fix in MakeRelative. Throw exception
435         in Parse when host length is 0 and the Uri is not a file.
436
437 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
438
439         * Uri.cs:
440         (CheckSchemeName): fixed bug #28549. Thanks to Eric Runquist.
441
442 2003-02-01  Miguel de Icaza  <miguel@ximian.com>
443
444         * Uri.cs (LocalPath): Local path should return un-escaped
445         strings.  Patch from tum@veridicus.com (Thong (Tum) Nguyen)
446
447 2002-09-16  Duncan Mak  <duncan@ximian.com>
448
449         * Uri.cs (GetObjectData):
450         (Uri): The key should be "AbsoluteUri", not "Uri".
451
452 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
453
454         * Uri.cs: Implemented a few of the protected methods. 
455
456 Mon Jun 17 15:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
457
458         * Uri.cs: workaround for mcs bug.
459
460 2002-05-28  Lawrence Pit <loz@cable.a2000.nl>
461
462         * Uri.cs: Implemented ctor UriTest (baseUri, relativeUri)
463         * Uri.cs: Fixed bug in internal method GetSchemeDelimiter
464
465 2002-05-22  Lawrence Pit <loz@cable.a2000.nl>
466
467         * Uri.cs: implemented MakeRelative, improved GetLeftPart
468         * UriBuilder.cs: removed Serializable attribute
469         * UriHostNameType.cs: added Basic
470
471 2002-05-12  Lawrence Pit <loz@cable.a2000.nl>
472
473         * Uri.LocalPath and Uri.AbsoluteUri modified to support both w32 
474         and *nix filepaths
475
476 2002-05-09  Lawrence Pit <loz@cable.a2000.nl>
477
478         * Uri.GetLeftPart fixed for mailto and news schemes.
479
480 2002-05-05  Lawrence Pit <loz@cable.a2000.nl>
481
482         * UriBuilder.cs: Implemented.
483         
484         * Uri.cs: Complete new reimplementation. 
485
486 2002-02-08  Duncan Mak  <duncan@ximian.com>
487
488         * UriFormatException.cs: Removed TODO attribute, the docs are
489         probably wrong here. In any case, this code compiles and should work.
490
491 2002-01-31  Duncan Mak  <duncan@ximian.com>
492
493         * UriFormatException.cs: Added bits for serialization.
494
495 2002-01-05  Ravi Pratap  <ravi@ximian.com>
496
497         * ChangeLog : Add to this directory.
498
499         * Uri.cs, UriFormatException.cs : Decorate bits with MonoTODO attribute.