Preserve FTP password and filename whitespace
This commit is contained in:
+7
-2
@@ -64,7 +64,9 @@ fn names_a_conflict(text: &str) -> bool {
|
||||
.collect();
|
||||
words.contains(&"exists")
|
||||
|| words.contains(&"nonempty")
|
||||
|| words.windows(2).any(|pair| matches!(pair, ["not" | "non", "empty"]))
|
||||
|| words
|
||||
.windows(2)
|
||||
.any(|pair| matches!(pair, ["not" | "non", "empty"]))
|
||||
}
|
||||
|
||||
/// What the first reply to a transfer command means. A transfer answers with
|
||||
@@ -255,7 +257,10 @@ mod tests {
|
||||
));
|
||||
// The same two conditions as other servers phrase them.
|
||||
assert!(matches!(
|
||||
refusal(550, "550 Cannot create a file when that file already exists."),
|
||||
refusal(
|
||||
550,
|
||||
"550 Cannot create a file when that file already exists."
|
||||
),
|
||||
Err(ErrorCode::Conflict)
|
||||
));
|
||||
assert!(matches!(
|
||||
|
||||
Reference in New Issue
Block a user