this.is() returns null when no body is passed (#850)

This commit is contained in:
Felix Sanz 2016-11-06 16:53:51 +01:00 committed by Julian Gruber
parent c62aa90e6e
commit 799d3b42a4

View file

@ -195,7 +195,7 @@ this.body = yield db.find('something');
Check if the incoming request contains the "Content-Type" Check if the incoming request contains the "Content-Type"
header field, and it contains any of the give mime `type`s. header field, and it contains any of the give mime `type`s.
If there is no request body, `undefined` is returned. If there is no request body, `null` is returned.
If there is no content type, or the match fails `false` is returned. If there is no content type, or the match fails `false` is returned.
Otherwise, it returns the matching content-type. Otherwise, it returns the matching content-type.