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
  • #1263
Closed
Open
Issue created May 17, 2018 by Administrator@rootContributor

selfHandleResponse: true => response broken

Created by: HugoMuller

I'm trying to manually handle the response with { selfHandleResponse: true }, but, as the doc says:

none of the webOutgoing passes are called

And that prevents me from correctly sending response.

This is the code causing the problem:

// passes/web-incoming.js
if(!res.headersSent && !options.selfHandleResponse) {
  for(var i=0; i < web_o.length; i++) {
    if(web_o[i](req, res, proxyRes, options)) { break; }
  }
}

Doing this, fixes it:

if(!res.headersSent) {
  for(var i=0; i < web_o.length; i++) {
    if(web_o[i](req, res, proxyRes, options)) { break; }
  }
}

I need to call the webOutgoing passes and do some extra stuff. But I can't. Maybe you can expose passes/web-outgoing, or add a flag like callWebOutgoing to let users call them if they want to.

Assignee
Assign to
Time tracking