Skip to content

http: verify method is a string

Rodrigo Muino Tomonari requested to merge github/fork/lucamaraschi/master into master
Checklist
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

http

Description of change

Added strict check for http request method to be a string. If method is not a string (or undefined or null) a TypeError exceptions is thrown. The method value is still defaulted to GET in the following cases:

  • method is undefined
  • method is null This fixes the http-client to crash if options.method in http.request was set to a number not equal to 0.

Merge request reports

Loading