Ugo Cei <u.cei <at> cbim.it> writes: > > 3. while the Tokenizer correctly works on "/../" the > > NetUtils.normalize() method has a problem with it: > > What is the correct output for "/../"? I'd say "/", but the testcase > expects "/../".
Good question. I did not thought much about it when adding it as testcase, but I think you are right with "/". I guess there are a few RFCs telling the correct way. Googling I found an URI class in JDK 1.4: http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html. It has almost all our NetUtils methods and claims RFC compatibility. So the best is probably to implement the same behaviour, if not even copying the algorithm. Is this allowed to provide this functionality to older JDKs? Joerg