Skip to content

Commit 7c1b74f

Browse files
TptFishrock123
authored andcommitted
Fixes error messages in Content-Type and Transfer-Encoding negotiation
1 parent b3fa1db commit 7c1b74f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/content/accept.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl Accept {
137137
}
138138
}
139139

140-
let mut err = Error::new_adhoc("No suitable ContentEncoding found");
140+
let mut err = Error::new_adhoc("No suitable Content-Type found");
141141
err.set_status(StatusCode::NotAcceptable);
142142
Err(err)
143143
}

src/content/accept_encoding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl AcceptEncoding {
107107
sort_by_weight(&mut self.entries);
108108
}
109109

110-
/// Determine the most suitable `Content-Type` encoding.
110+
/// Determine the most suitable `Content-Encoding` encoding.
111111
///
112112
/// # Errors
113113
///
@@ -130,7 +130,7 @@ impl AcceptEncoding {
130130
}
131131
}
132132

133-
let mut err = Error::new_adhoc("No suitable ContentEncoding found");
133+
let mut err = Error::new_adhoc("No suitable Content-Encoding found");
134134
err.set_status(StatusCode::NotAcceptable);
135135
Err(err)
136136
}

src/transfer/te.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl TE {
109109
sort_by_weight(&mut self.entries);
110110
}
111111

112-
/// Determine the most suitable `Content-Type` encoding.
112+
/// Determine the most suitable `Transfer-Encoding` encoding.
113113
///
114114
/// # Errors
115115
///
@@ -132,7 +132,7 @@ impl TE {
132132
}
133133
}
134134

135-
let mut err = Error::new_adhoc("No suitable ContentEncoding found");
135+
let mut err = Error::new_adhoc("No suitable Transfer-Encoding found");
136136
err.set_status(StatusCode::NotAcceptable);
137137
Err(err)
138138
}

0 commit comments

Comments
 (0)