Skip to content

bad remote IP address in HttpRequest.connectionInfo of a HTTPServer on Windows #23031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Mar 30, 2015 · 4 comments
Closed
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-stale Closed as the issue or PR is assumed stale library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Mar 30, 2015

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. create a dart HTTPServer on Windows using ANY_IP_V6 in the 'bind'
  2. upon a client connection arriving, print out the HttpRequest.connectionInfo.remoteAddress.address
  3. repeat many connections from the same client

What is the expected output? What do you see instead?

expected output: the remote IP address
instead: we get strange values and the first connection has a different value

What version of the product are you using?
Dart 1.9.1 and previous versions too

On what operating system?
Windows 7 SP1 (64bit) and Windows 8.1 (64bit)

What browser (if applicable)?
N/A

Please provide any additional information below.
works fine on Linux
didn't try on MacOS
work fine if ANY_IP_V4 is used in the bind

full sample: https://gist.github.com/kgersen/40fc031bf045387a6045
run server.dart on a windows machine
run "client.dart http://server_ip:8192" on same machine or another

@DartBot
Copy link
Author

DartBot commented Mar 30, 2015

This comment was originally written by @zoechi


What value do you get? What do you expect instead?
"::1" for example is a valid IP address (localhost)
If you want to create an URL from this value it looks like
http://[::1]:33333

@lrhn
Copy link
Member

lrhn commented Mar 30, 2015

Added Area-Library, Library-IO, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Mar 30, 2015

This comment was originally written by @zoechi


I got "::1" when I tried it on
Dart VM version: 1.10.0-edge.44764 (Fri Mar 27 15:45:24 2015) on "linux_x64"

@DartBot
Copy link
Author

DartBot commented Mar 30, 2015

This comment was originally written by [email protected]


"on Windows" as stated in the title and the "additional information" section.

I get long, meaningless values.
For instance, on the same machine, using its lan IP (192.168.1.42), when I launch 3 times "client.dart http://192.168.1.42:8192", I see this in the server window:
http connection from: ::2100:5300:0:0 at ::2100:5300:0:0%1076876064
http connection from: ::10e3:2e04:0:0%70181568 at ::e108:2005:0:0%70180416
http connection from: ::10e3:2e04:0:0%70181568 at ::e108:2005:0:0%70180416

if I use ANY_IP_V4 in the 'bind' then I get:

http connection from: 192.168.1.42 at 192.168.1.42
http connection from: 192.168.1.42 at 192.168.1.42
http connection from: 192.168.1.42 at 192.168.1.42

which is the expected behavior.

If I use client.dart on a remote machine (or "wget http://ip_of_server:8192" if Dart is not available on the remote machine) I get the same issue (so it's not a "same machine" to "same machine" issue).

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io labels Mar 30, 2015
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Mar 1, 2016
@lrhn lrhn closed this as completed Apr 8, 2024
@lrhn lrhn added the closed-stale Closed as the issue or PR is assumed stale label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-stale Closed as the issue or PR is assumed stale library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants