Skip to content

Commit 8aaef9a

Browse files
committed
Fixes error messages in Content-Type and Transfer-Encoding negotiation
1 parent dab0f62 commit 8aaef9a

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
@@ -141,7 +141,7 @@ impl Accept {
141141
}
142142
}
143143

144-
let mut err = Error::new_adhoc("No suitable ContentEncoding found");
144+
let mut err = Error::new_adhoc("No suitable Content-Type found");
145145
err.set_status(StatusCode::NotAcceptable);
146146
Err(err)
147147
}

src/content/accept_encoding.rs

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

113-
/// Determine the most suitable `Content-Type` encoding.
113+
/// Determine the most suitable `Content-Encoding` encoding.
114114
///
115115
/// # Errors
116116
///
@@ -133,7 +133,7 @@ impl AcceptEncoding {
133133
}
134134
}
135135

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

src/transfer/te.rs

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

111-
/// Determine the most suitable `Content-Type` encoding.
111+
/// Determine the most suitable `Transfer-Encoding` encoding.
112112
///
113113
/// # Errors
114114
///
@@ -131,7 +131,7 @@ impl TE {
131131
}
132132
}
133133

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

0 commit comments

Comments
 (0)