Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Issues
  • #59
Closed
Open
Issue created Jun 09, 2011 by Administrator@rootContributor

HTTP/1.0 proxied as HTTP/1.1

Created by: fidian

Sample code:

require('http-proxy').createServer(80, 'localhost').listen(8001); 

Sample request:

GET /phpinfo.php HTTP/1.0
Host: localhost:8001

Request that goes to the server:

GET /phpinfo.php HTTP/1.1
host: localhost:8001
x-forwarded-for: 127.0.0.1
x-forwarded-port: 38349
x-forwarded-proto: http
Connection: close

The server's response for this page looks like this:

HTTP/1.1 200 OK
Date: Thu, 09 Jun 2011 14:53:41 GMT
Server: Apache/2.2.17 (Ubuntu)
X-Powered-By: PHP/5.3.5-1ubuntu7.2
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

259f
<html><head>...lots of HTML

The response to the client looks identical. This, unfortunately, breaks the HTTP/1.0 response since now we are both sending an HTTP/1.1 status and we are doing chunked encoding. The HTTP/1.0 client can't understand this.

The fix: Make the request to the server an HTTP/1.0 request to mirror the client's desires perfectly.

Assignee
Assign to
Time tracking