(headers)
| 263 | } |
| 264 | |
| 265 | async writeHeaders(headers) { |
| 266 | this.headers = headers; |
| 267 | this._parseContentLength(); |
| 268 | await this._parseContentType(); |
| 269 | |
| 270 | if (!this._parser) { |
| 271 | this._error( |
| 272 | new FormidableError( |
| 273 | 'no parser found', |
| 274 | errors.noParser, |
| 275 | 415, // Unsupported Media Type |
| 276 | ), |
| 277 | ); |
| 278 | return; |
| 279 | } |
| 280 | |
| 281 | this._parser.once('error', (error) => { |
| 282 | this._error(error); |
| 283 | }); |
| 284 | } |
| 285 | |
| 286 | write(buffer) { |
| 287 | if (this.error) { |
no test coverage detected