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