(method: string)
| 603 | |
| 604 | it('should reject non-uppercase trace consistently regardless of access order', async () => { |
| 605 | const createTraceLikeRequest = (method: string) => { |
| 606 | const socket = new Socket() |
| 607 | const incomingMessage = new IncomingMessage(socket) |
| 608 | incomingMessage.method = method |
| 609 | incomingMessage.headers = { |
| 610 | host: 'localhost', |
| 611 | 'content-type': 'text/plain', |
| 612 | } |
| 613 | incomingMessage.rawHeaders = ['host', 'localhost', 'content-type', 'text/plain'] |
| 614 | incomingMessage.url = '/foo.txt' |
| 615 | ;(incomingMessage as IncomingMessage & { rawBody: Buffer }).rawBody = Buffer.from('foo') |
| 616 | return newRequest(incomingMessage) |
| 617 | } |
| 618 | |
| 619 | for (const method of ['trace', 'TrAcE']) { |
| 620 | const req = createTraceLikeRequest(method) |
no test coverage detected
searching dependent graphs…