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
  • #930
Closed
Open
Issue created Dec 27, 2015 by Administrator@rootContributor

Can't set headers after they are sent

Created by: xolf

I just got a very strange error. The proxy tries to send the header twice and I have no idea why.

_http_outgoing.js:335
    throw new Error('Can\'t set headers after they are sent.');
          ^
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
    at g:\nodejs\http-proxy\node_modules\http-proxy\lib\http-proxy\passes\web-outgoing.js:85:11
    at Array.forEach (native)
    at Array.writeHeaders (g:\nodejs\http-proxy\node_modules\http-proxy\lib\http-proxy\passes\web-outgoing.js:84:35)
    at ClientRequest.<anonymous> (g:\nodejs\http-proxy\node_modules\http-proxy\lib\http-proxy\passes\web-incoming.js:151:20)
    at ClientRequest.emit (events.js:107:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:419:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
    at Socket.socketOnData (_http_client.js:310:20)
    at Socket.emit (events.js:107:17)

My proxy.js file: https://gist.github.com/xolf/f79a1f939d7dc64c9894

Assignee
Assign to
Time tracking