The test against host being NULL is mistaken. In the case where a "file:" URL is being constructed, a good deal of existing code passes 'null' as the host. This test should be ommitted if the protocol is "file". I found this because it broke Jim Clark's xt package. I'ld say high priority.