When using the NSURL constructor
initWithScheme:(NSString *) host:(NSString *) path:(NSString *)
iOS for some reason appends two extra trailing slashes if the path ends with a slash, unless it's only @"/".
Does anyone know why this is, and if there's a way around it other than composing the url manually with something like
[NSURL URLWithString:[NSString stringWithFormat:@"%@://%@%@", scheme, host, path]];
Aucun commentaire:
Enregistrer un commentaire