Closed Bug 883981 Opened 11 years ago Closed 11 years ago

correctly reflect the server's port in httpd.js

Categories

(Testing :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla24

People

(Reporter: froydnj, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
httpd.start says that you can pass -1 in to automagically choose a port. Unfortunately, the identity of that port is not correctly reflected in the ServerIdentity that the server exposes, since the -1 port is passed directly in to ServerIdentity, with bad consequences: http://mxr.mozilla.org/mozilla-central/source/netwerk/test/httpserver/httpd.js#903 Instead, initialize the ServerIdentity with the port from the listening socket we initialized.
Attachment #763714 - Flags: review?(ted)
Blocks: 813742
Comment on attachment 763714 [details] [diff] [review] correctly reflect the server's port in httpd.js Review of attachment 763714 [details] [diff] [review]: ----------------------------------------------------------------- Does -1 actually work? I know zero is the common way to do this at the actual BSD socket API level.
Attachment #763714 - Flags: review?(ted) → review+
Assignee: nobody → nfroyd
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #2) > Does -1 actually work? I know zero is the common way to do this at the > actual BSD socket API level. nsServerSocket will accept 0, but nsIServerSocket and nsIHttpServer both document -1 as the "let a port be chosen for me". So it seemed better to use that instead.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Blocks: 884421
Component: httpd.js → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: