improve HTTP URL handling