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
  • Merge requests
  • !736

copy headers instead of referencing them so they don't unexpectedly get overwritten

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/richardkazuomiller/copy-headers into master Nov 12, 2014
  • Overview 5
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: richardkazuomiller

Currently common.setupOutgoing uses a reference to the original request headers, which causes Connection to be overwritten in some cases, and Host to be overwritten when changeOrigin is set to true. If you use the proxyReq to look at the original request and the proxy request you will find that those headers have been modified on the original request object.

I modified one test case that set the request headers to a string because using utils._extend on a string doesn't work. As far as I know req.headers will always be an object so I think what I did is fine but if there's a reason that was a string, I'll fix it so it checks the type.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/richardkazuomiller/copy-headers