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
  • #347
Closed
Open
Issue created Dec 07, 2012 by Administrator@rootContributor

Uncatchable error when upstream server returns malformed HTTP response

Created by: jcheng5

We have a production app that uses node-http-proxy running in front of some (admittedly sketchy) webservers running R code. (http://www.r-project.org) We've been seeing our node process crash several times a day. It turns out to be a bug in node with a known workaround but node-http-proxy prevents us from using that workaround.

There was a bug in the R code that caused the Content-Length to be inaccurately reported upstream. The issue here though is that the content-length caused Node issue 3776 to come into effect; when an http request is made and the node http parser encounters an error, that error is emitted on the socket/connection object. In the case of node-http-proxy's proxyRequest method, the caller can never catch that error, and therefore the node process exits. Obviously we would rather gracefully deal with the error than have the process exit.

Issue 3776 was fixed in Node 0.9.2 but since Node 0.8.15 is still the latest stable version, it would be great if this bug could be worked around in node-http-proxy as well. I'm about to submit a pull request that approximates the Node 0.9.2 fix.

Assignee
Assign to
Time tracking