port

ポート (URL)

[6] URL における port は、ポート番号を表します。

[15] ポート (TCP/IP) も参照。

仕様書

構文

[9] ポートは、零文字以上のASCII数字です。

  1. *
    1. ASCII数字

[10] 空文字列もなぜか認められています。

[11] 先導0も認められています。

[12] TCPUDP で認められていないポート番号も使えます。

文脈

[13] port は、 URLauthority のうち、 host の後の : よりも後の部分です。

[14] ただし :port は省略できます。

[162] 項組起源ポート >>161 は、 起源のうちのポートの部分を表しています。

項組起源参照。

既定のポート

[5] 既定のポート

[3] Bug 54090 – KURL should remove default port numbers when canonicalizing urls ( ( 版)) <https://bugs.webkit.org/show_bug.cgi?id=54090>

TCP/IP ポート番号以外を使う URL scheme

Location インターフェイス port 属性

性質

[23] この属性は、 Unforgeable です >>21

取得器

[24] location.port取得器は、次のようにしなければなりません >>21

  1. [25] 文脈オブジェクト関係するDocument起源入口設定群オブジェクト起源同じ起源ドメインでなければ、
    1. [26] SecurityError 例外投げ、ここで停止します。
  2. [27] URLを、文脈オブジェクトURL に設定します。
  3. [28] URLポートnull なら、
    1. [29] 空文字列を返してここで停止します。
  4. [30] URLポート整数の直列化を適用した結果を返します。

設定器

[31] location.port設定器は、次のようにしなければなりません >>21

  1. [38] 入力を、与えられた値を USVString として解釈した結果に設定します。
  2. [32] 文脈オブジェクト関係するDocument起源入口設定群オブジェクト起源同じ起源ドメインでなければ、
    1. [33] SecurityError 例外投げ、ここで停止します。
  3. [34] 複製を、文脈オブジェクトURL に設定します。
  4. [35] 複製cannot-be-a-base-URL flagが設定されていれば、
    1. [51] ここで停止します。
  5. [37] 複製cannot have a username/password/portなら、
    1. [50] ここで停止します。
  6. [44] 入力空文字列なら、
    1. [45] 複製ポートnull に設定します。
  7. [36] それ以外の場合、
    1. [46] 入力基本URL構文解析を適用します。 URL複製状態上書きport state とします。
  8. [22] 文脈オブジェクト複製について Location-object-setter navigate を実行します。

歴史

[2] http: URIポート番号を含められるようになったのはLine Mode Browserではの0.12からのようです。

[1] about: とかポートのない URI を開いている時に location.port を見ると、 134946048 とか変な値になります。 DOM Inspector で見ると 1 になっています。 (Firefox 1.0.4)

[16] I can't bind to a port – Help Center ( 版) <https://help.openshift.com/hc/en-us/articles/202185874-I-can-t-bind-to-a-port>

It is possible to bind to the internal IP with port range: 15000 - 35530. All other ports are reserved for specific processes to avoid conflicts.

[17] >>16 0.0.0.0 や 127.0.0.1 では bind できなくて、 OPENSHIFT_DIY_IP など適当な環境変数を使う必要があるようです。

[18] RFC 7605 - Recommendations on Using Assigned Transport Port Numbers ( 版) <https://tools.ietf.org/html/rfc7605>

[19] Make port either null or a 16-bit integer. Fixes https://www.w3.org/B… · whatwg/url@c3a454c ( 版) <https://github.com/whatwg/url/commit/c3a454c073d6bf9f24d8ee2b5c3e6e006b943777>

[20] Fix #76: a URL's port is a 16-bit _unsigned_ integer · whatwg/url@ce81868 ( 版) <https://github.com/whatwg/url/commit/ce81868076997e749a4cc749b3fe3754068de7a8>

[40] Editorial: non-relative flag got renamed · whatwg/html@d360c27 ( 版) <https://github.com/whatwg/html/commit/d360c27d44c52390441b5910d39e898160ec016d>

[41] Merge effective script origin into origin · whatwg/html@8a843f2 ( 版) <https://github.com/whatwg/html/commit/8a843f2169a6864a3024c4329528dccb2051d275>

[42] Change URL's port attribute's setter (SimonSapin著, ) <https://github.com/whatwg/url/commit/05ffaa644bc3cd4c6694ac6db11a072781af449c>

[43] Change Location/<a>/<area>'s port setter (annevk著, ) <https://github.com/whatwg/html/commit/c62eddef0ee671f362678486f68af6adbb005740>

[47] Editorial: give URL syntax components their own terms (annevk著, ) <https://github.com/whatwg/url/commit/451696e4297c4c676fae21dbc926aeafb2477e6c>

[48] Microsoft Office Outlook 用タイム ゾーン データ更新ツールを使用してタイム ゾーンの変更に対処する方法 () <https://support.microsoft.com/ja-jp/help/931667/how-to-address-time-zone-changes-by-using-the-time-zone-data-update-tool-for-microsoft-office-outlook>

夏時間の歴史に関する一般的な情報については、次の Web サイトを参照してください。

http://www.seizethedaylight.com/dst

http://www.npr.org:80/templates/story/story.php?storyId=4572036

[49] Cleanup API for file and non-special URLs (annevk著, ) <https://github.com/whatwg/url/commit/cf616f9d3fca44bd5329e992519a4236a39b0cb7>

[52] Normalize port after updating scheme (TimothyGu著, ) <https://github.com/whatwg/url/commit/0f53958338bbaec3882f902897873da59ba7e8bd>

[53] Setting scheme should set port to null if it matches the default port · Issue #327 · whatwg/url () <https://github.com/whatwg/url/issues/327>

[54] Normalize port after updating scheme by TimothyGu · Pull Request #328 · whatwg/url () <https://github.com/whatwg/url/pull/328>