ECONNREFUSED error with node.js that does not occur in other clients

前端 未结 5 1776
面向向阳花
面向向阳花 2020-12-30 21:42

I\'m making an http request with the node.js client, and I get an ECONNREFUSED error. When I make what appears to be the same request

5条回答
  •  生来不讨喜
    2020-12-30 22:11

    I disagree with Soman's disagreement.

    I've been pulling my hair out on this one, but yes, sure enough nodejs v0.10.24 and v0.10.25 refuse to connect to a PHP 5.4 development server (PHP's command line server) when invoked as:

    php -S localhost:8088
    

    The browser, curl, everything else connects just fine. Yet, sure enough, changing the binding address to be:

    php -S 127.0.0.1:8088 
    

    And nodejs' using xmlrpc connects just fine. This occurred on a Mac OS X 10.9.1. Very odd.

提交回复
热议问题