micro_http: check arithmetic operations
Signed-off-by: Ioana Chirca <chioana@amazon.com> Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
committed by
Adrian Catangiu
parent
9830b66a09
commit
17ead39d82
@@ -109,6 +109,7 @@ impl ResponseHeaders {
|
||||
let delimitator = b", ";
|
||||
for (idx, method) in self.allow.iter().enumerate() {
|
||||
buf.write_all(method.raw())?;
|
||||
// We check above that `self.allow` is not empty.
|
||||
if idx < self.allow.len() - 1 {
|
||||
buf.write_all(delimitator)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user