Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Backward compatibility issue: using named pipe as port doesn't work in 0.8.0 like it worked in 0.6.* #3558

Closed
yosefd opened this issue Jun 27, 2012 · 5 comments

Comments

@yosefd
Copy link

yosefd commented Jun 27, 2012

Worked well with 0.6.*

See simple script that demonstrates: https://gist.github.com/3003574

On 0.6.19 the output:

listening on: \\.\pipe\nameofthepipe
request received
STATUS: 200
BODY: gotyou

on 0.8.0 the output:

listening on: \\.\pipe\nameofthepipe
request failed: { [Error: connect EADDRNOTAVAIL]
  code: 'EADDRNOTAVAIL',
  errno: 'EADDRNOTAVAIL',
  syscall: 'connect' }
@yosefd
Copy link
Author

yosefd commented Jun 27, 2012

The following modification works:

var opt = {
    //host: 'localhost',
    //port: port,
    socketPath: port,
    method: 'GET'
}

but the backward compatibility is broken.

@piscisaureus
Copy link

@yosefd

This change was unintended, but I am not sure whether we want to fix it. I mean, when you specify both a host and a pipe name, you're almost asking for undefined behaviour. Does this cause you a lot of trouble?

@yosefd
Copy link
Author

yosefd commented Jun 27, 2012

I think this will affect not only windows, but all platforms.

@piscisaureus

It brakes existing node modules out there.

E.g., I am using http-proxy. Without modification, this module will not work over named pipes on 0.8.0. I've already made changes in my version of http-proxy to comply with new 0.8.0 interface and I will send pull request to http-proxy owners if node's interface is not going to change.

I guess, this change in 0.8.0 will cause issues with other modules, so it is a question of fixing all usages or creating backward compatibility fallback in node. Both approaches make sense.

@jasnell
Copy link
Member

jasnell commented May 20, 2015

@joyent/node-coreteam ... recommend closing.

@jasnell
Copy link
Member

jasnell commented Jun 3, 2015

Closing. Can reopen if necessary.

@jasnell jasnell closed this as completed Jun 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants