(chunk)
| 2009 | } else if (headers != null) { |
| 2010 | throw new InvalidArgumentError("headers must be an object or an array"); |
| 2011 | } |
| 2012 | validateHandler(handler, method, upgrade); |
| 2013 | this.servername = servername || getServerName(this.host); |
| 2014 | this[kHandler] = handler; |
| 2015 | if (channels.create.hasSubscribers) { |
| 2016 | channels.create.publish({ request: this }); |
| 2017 | } |
| 2018 | } |
| 2019 | onBodySent(chunk) { |
| 2020 | if (this[kHandler].onBodySent) { |
| 2021 | try { |
| 2022 | return this[kHandler].onBodySent(chunk); |
no test coverage detected