On Mon, 2010-01-18 at 12:16 -0500, Scott Lawrence wrote: > > > 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...
Currently, I think that causing the Url parser to recognize "UNKNOWN-URL-SCHEME" as a scheme, and thus create a Url object that is flagged as invalid, should be a small and easy fix. I'm working on the code right now. If we can get that fix in, it should be quite safe, and eliminates the fact that a "round trip conversion" from Url object to string to Url object causes invalidity to be lost. In the long run, we need to be more clever about handling invalid Url's, and also about checking that Url parsing has succeeded. I've coded a change to the Registrar to only put sip: and sips: URIs in the registration table (and log warnings for all other URIs), but I've been reluctant to check it in until the scstrial test system is more stable. Dale _______________________________________________ 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/
