[FIX] urlWithPassword-ls (tests pass)

Lex Spoon lex at cc.gatech.edu
Mon Jul 21 16:30:39 UTC 2003


After a one-line change, all tests pass.  Doh -  SUnit tests work better
when you actually have them loaded!

Regarding the ftp:xyz test, the test does check for the intended
behavior of Squeak.  It's invalid input, according to RFC 2396, and
Squeak's interpretation is the most likely one that people would intend. 
It is *not* a valid way to encode ftp://xyz -- you have to include the
slashes, and the number of slashes is significant.  From the RFC,
section 3:

      absoluteURI   = scheme ":" ( hier_part | opaque_part )

      hier_part     = ( net_path | abs_path ) [ "?" query ]

      net_path      = "//" authority [ abs_path ]

      abs_path      = "/"  path_segments


Thus, Squeak is treating invalid input under its most like intended
interpretation.  The main alternative would be to generate an error in
this case, instead of glossing over it. Does anyone know how common
http:xyz URL's are nowadays?


from preamble:

"Change Set:		urlWithPassword-ls
Date:			15 June 2003
Author:			Lex Spoon

Parse URL's that have a password specified in them.

Adds test cases for this situation in the UrlTestCase classe; if there
is a package somewhere that has URL tests in it, these should be moved
there.

Also does some minor refactoring of the relevant code.

The current code gives a walkback on encountering such URL's, which is
frustrating if you are trying to delete spams within Celeste.

Note: this code does not actually *use* the username and password that
are specified; it only parses them.
"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: urlWithPassword-ls.cs.gz
Type: application/octet-stream
Size: 2487 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030721/c4740d8d/urlWithPassword-ls.cs.obj


More information about the Squeak-dev mailing list