request: complete idempotent methods

see rfc2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.

Intact idempotent HTTP methods should be:
GET, HEAD, PUT, DELETE, OPTIONS and TRACE
master
Yazhong Liu 2014-05-03 02:56:08 +08:00
parent 0491dc7532
commit b969ecf223
1 changed files with 2 additions and 2 deletions

View File

@ -259,8 +259,8 @@ module.exports = {
*/
get idempotent() {
return 'GET' == this.method
|| 'HEAD' == this.method;
var idempotents = ['GET','HEAD','PUT','DELETE','OPTIONS','TRACE'];
return idempotents.indexOf(this.method) !== -1;
},
/**