On Mon, 2010-01-18 at 09:35 -0500, Carolyn Beeton wrote: > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of > > Worley, Dale AVAYA (BL60:9D30) > > Sent: Wednesday, January 13, 2010 5:18 PM > > To: sipX-dev > > Subject: [sipX-dev] Modifying the Url class parser to > > recognizescheme "UNKNOWN-URL-SCHEME" > > > > Currently, if you attempt to parse a string as a URI (using > > Url(...)), if the parse fails, the scheme field of the Url > > object is set to "UNKNOWN-URL-SCHEME". If you turn the Url > > into a string, the string looks something like this: . > > However, if you attempt to parse *that* string, the Url > > parser guesses that you just left off the "sip:", because it > > doesn't recognize the scheme of the URI. So that string is > > parsed as if it is "sip:UNKNOWN-URL-SCHEME:[email protected]", > > which is legitimate, with a user-part of "UNKNOWN-URL-SCHEME" > > and a password-part of "203". > > > > I think the situation would be improved if the URI parser > > considered "UNKNOWN-URL-SCHEME" as a known scheme type, so > > that when "UNKNOWN-URL-SCHEME:[email protected]" is parsed > > into a Url object, that object's getScheme returns UnknownUrlScheme. > > > > That sounds good to me - then the parse error which initially went > undetected (which, as Scott said somewhere else in this thread, is a > bug) will be flagged again, and the "user" part remains user instead of > being demoted to "password"! Though maybe we should not return anything > else in the Url if the scheme is unknown due to parse error - then we > would have our noses rubbed in the error instead of some things sort of > working some of the time...
I think that ultimately something like that is the correct answer, but that's a big change to make this late in the release cycle... _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
