GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Wrong legacy API parameter caused by typo in _http_agent.js · Issue #5051 · nodejs/node

Wrong legacy API parameter caused by typo in _http_agent.js #5051

New issue
Copy link
New issue
Copy link
Closed
Closed
Wrong legacy API parameter caused by typo in _http_agent.js#5051
Copy link
Labels
good first issueIssues that are suitable for first-time contributors.httpIssues and PRs related to the http subsystem.

Description

@asukakenji
asukakenji
opened on Feb 3, 2016
Issue body actions

At https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L114:

The line should read:

      localAddress: arguments[3]

instead of:

      path: arguments[3]

The localAddress parameter was added to the addRequest() function in lib/http.js since 1e9bcf2#diff-1c0f1c434b17b7f8795d44a51a14320a.

The function was then refactored into _http_agent.js at 12cd133.

However, the localAddress parameter was mistaken to be path during the refactoring. Below are some evidences showing that the parameter should be localAddress.

Here is the current code in master:

  • https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L108,L118

Here is how the options object is used. It clearly expects localAddress:

  • https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L93,L106

Here is the code in an old release (v0.10.36, which is the version currently used on AWS):

  • https://github.com/nodejs/node/blob/v0.10.36-release/lib/http.js#L1264,L1268

These clears shows the format host:port:localAddress:

  • https://nodejs.org/api/http.html#http_agent_getname_options
  • https://nodejs.org/api/http.html#http_agent_maxsockets
  • https://nodejs.org/docs/latest-v0.10.x/api/http.html#http_agent_maxsockets

Activity

  1. mscdex
    added
    httpIssues and PRs related to the http subsystem.
    on Feb 3, 2016
  2. evanlucas commented on Feb 3, 2016

    @evanlucas
    evanlucas
    on Feb 3, 2016
    Contributor
    More actions

    This does appear to be the case. Is this breaking something for you?

  3. asukakenji commented on Feb 3, 2016

    @asukakenji
    asukakenji
    on Feb 3, 2016
    Author
    More actions

    Yes, of course! If it didn't break anything, why did I spend my time digging into the code, finding the problem, and issuing a bug report?

  4. cjihrig commented on Feb 3, 2016

    @cjihrig
    cjihrig
    on Feb 3, 2016
    Contributor
    More actions

    @asukakenji would you mind opening a PR, including a regression test?

  5. asukakenji commented on Feb 3, 2016

    @asukakenji
    asukakenji
    on Feb 3, 2016
    Author
    More actions

    Of course I would like to do something to help! But it is my first time doing that, would you please point me to some guide lines? Thanks!

  6. cjihrig commented on Feb 3, 2016

    @cjihrig
    cjihrig
    on Feb 3, 2016
    Contributor
    More actions

    Sure thing! Please see https://github.com/nodejs/node/blob/master/CONTRIBUTING.md.

  7. evanlucas
    added
    good first issueIssues that are suitable for first-time contributors.
    on Feb 9, 2016
  8. dirceu
    added a commit that references this issue on May 10, 2016

    http: use `localAddress` instead of `path`

    cd4c6b5
  9. bnoordhuis
    closed this as completedin fe77de1on May 19, 2016
  10. Fishrock123
    added a commit that references this issue on May 23, 2016

    http: use `localAddress` instead of `path`

    a3b3a47
  11. rvagg
    added a commit that references this issue on Jun 2, 2016

    http: use `localAddress` instead of `path`

    2ab3609
  12. addaleax
    added a commit that references this issue on Apr 27, 2017

    test: dynamic port in parallel regress tests

    e927809
  13. MylesBorins
    added a commit that references this issue on Jul 11, 2017

    test: dynamic port in parallel regress tests

    03adb94
  14. lpinca
    added a commit that references this issue on Mar 13, 2018

    test: use descriptive names for regression tests

    90b0538
  15. MylesBorins
    added 2 commits that reference this issue on Mar 20, 2018

    test: use descriptive names for regression tests

    8e07e51

    test: use descriptive names for regression tests

    f490421
  16. MayaLekova
    added a commit that references this issue on May 8, 2018

    test: use descriptive names for regression tests

    eb94cdd
  17. sjarmak
    added a commit that references this issue on Jul 27, 2026

    http: use `localAddress` instead of `path`

    fe77de1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues that are suitable for first-time contributors.httpIssues and PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.