Skip to content

Use "127.0.0.1" instead of "localhost" host argument #2

@rajeshrah22

Description

@rajeshrah22

Platform: Fedora linux
Deno version:

$ deno --version
deno 2.5.2 (stable, release, x86_64-unknown-linux-gnu)
v8 14.0.365.5-rusty
typescript 5.9.2
rahulrajesh@fedora:~/projects/h1spec$ deno run --allow-net http_test.ts localhost 8000
Error in test "Fragmented method": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 0)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented URL 1": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 1)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented URL 2": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 2)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented URL 3": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 3)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented HTTP version": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 4)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented request line": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 5)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented request line newline 1": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 6)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented request line newline 2": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 7)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented field name": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 8)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented field value 1": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 9)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented field value 2": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 10)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented field value 3": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 11)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented field value 4": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 12)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented request": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 13)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Fragmented request termination": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 14)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Request without HTTP version": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 15)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Request with Expect header": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 16)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Valid GET request": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 17)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Valid GET request with edge cases": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 18)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Invalid header characters": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 19)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Missing Host header": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 20)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Multiple Host headers": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 21)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Overflowing negative Content-Length header": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 22)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Negative Content-Length header": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 23)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Non-numeric Content-Length header": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 24)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Empty header value": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 25)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Header containing invalid control character": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 26)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Invalid HTTP version": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 27)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Invalid prefix of request": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 28)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Invalid line ending": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 29)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Valid POST request with body": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 30)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Chunked Transfer-Encoding": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 31)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}
Error in test "Conflicting Transfer-Encoding and Content-Length in varying case": ConnectionRefused: Connection refused (os error 111)
    at async Object.connect (ext:deno_net/01_net.js:701:11)
    at async runTestCase (file:///home/rahulrajesh/projects/h1spec/http_test.ts:223:22)
    at async Promise.all (index 32)
    at async runTests (file:///home/rahulrajesh/projects/h1spec/http_test.ts:209:21) {
  name: "ConnectionRefused",
  code: "ECONNREFUSED"
}

0 out of 33 tests passed.
rahulrajesh@fedora:~/projects/h1spec$ 
$ deno run --allow-net http_test.ts 127.0.0.1 8000
✅ Fragmented method: Server waited successfully
✅ Fragmented URL 1: Server waited successfully
✅ Fragmented URL 2: Server waited successfully
✅ Fragmented URL 3: Server waited successfully
✅ Fragmented HTTP version: Server waited successfully
✅ Fragmented request line: Server waited successfully
✅ Fragmented request line newline 1: Server waited successfully
✅ Fragmented request line newline 2: Server waited successfully
✅ Fragmented field name: Server waited successfully
✅ Fragmented field value 1: Server waited successfully
✅ Fragmented field value 2: Server waited successfully
✅ Fragmented field value 3: Server waited successfully
✅ Fragmented field value 4: Server waited successfully
✅ Fragmented request: Server waited successfully
✅ Fragmented request termination: Server waited successfully
❌ Request without HTTP version: Read operation timed out
❌ Request with Expect header: Read operation timed out
❌ Valid GET request: Read operation timed out
❌ Valid GET request with edge cases: Read operation timed out
❌ Invalid header characters: Read operation timed out
❌ Missing Host header: Read operation timed out
❌ Multiple Host headers: Read operation timed out
❌ Overflowing negative Content-Length header: Read operation timed out
❌ Negative Content-Length header: Read operation timed out
❌ Non-numeric Content-Length header: Read operation timed out
❌ Empty header value: Read operation timed out
❌ Header containing invalid control character: Read operation timed out
❌ Invalid HTTP version: Read operation timed out
❌ Invalid prefix of request: Read operation timed out
❌ Invalid line ending: Read operation timed out
❌ Valid POST request with body: Read operation timed out
❌ Chunked Transfer-Encoding: Read operation timed out
❌ Conflicting Transfer-Encoding and Content-Length in varying case: Read operation timed out

15 out of 33 tests passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions