Use HTTP_METHOD_NOT_ALLOWED when invalid method is specified

Change-Id: I41b2c565f40fa1ab4545b5675572947e40729238
Merge "Use HTTP_METHOD_NOT_ALLOWED when invalid method is specified"