Nice find :). Perhaps the parts dependent on uri->authority should be inside the if body: if ( strncmp ( path, "//", 2 ) == 0 ) { The goto achieves the same effect but without moving the code into the if body to make its scope clear. Stefan