* 仕様書

[REFS[
- [36] '''[CITE@en[URL Standard]] ([TIME[2016-05-25 22:00:23 +09:00]]) <https://url.spec.whatwg.org/#url-parsing>'''
- [23] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-06-04 03:01:52 +09:00]]) <https://html.spec.whatwg.org/#resolving-urls>
]REFS]

* URL 構文解析器

[37] [DFN[[RUBYB[URL 構文解析器]@en[URL parser]]]]は、
[[文字列]][VAR[入力]]、
[[基底URL]]を表す省略可能な[[URL記録]][VAR[基底]]、
省略可能な[[文字符号化]][VAR[符号化上書き]]について、
次のようにします [SRC[>>36]]。
[FIG(steps)[
= [38] [VAR[URL]] を、[VAR[入力]]、[VAR[基底]]、[VAR[符号化上書き]]に[[基本URL構文解析器]]を適用した結果に設定します。
= [39] [VAR[URL]] が[[失敗]]なら、
== [40] [[失敗]]を返し、ここで停止します。
= [41] [VAR[URL]] の [F[scheme][URL scheme]] が [CODE[blob][blob:]] の場合、
== [44] 
[VAR[結果]]を、
[VAR[URL]] に
[[blob URLの解決]]を適用した結果に設定します。
== [45] [VAR[結果]]が[[失敗]]で''ない''場合、
=== [43] 
[VAR[URL]] の [F[blob URL entry]] を、[VAR[結果]]に設定します。
= [42] [VAR[URL]] を返します。
]FIG]

[47] つまり [[URL文字列]]に [[URL構文解析器]]を適用して [[URL記録]]を得た時点で、
[CODE(URI)@en[blob:]] [[URL]] と参照先の[[オブジェクト]]との関連付けが行われます。

[51] [DFN[[RUBYB[URL の構文解析]@en[parse a URL]]]]は、
[[文書]]や[[環境設定群オブジェクト]]に関する演算です。

[52] [[文書]][VAR[文書]]に対して[[文字列]][VAR[入力]]を[[構文解析][URLの構文解析]]するには、
次のようにしなければ[MUST[なりません]] [SRC[>>23]]。
[FIG(steps)[
= [53] [[URL構文解析]]を実行した結果を返します。
[FIG(list members)[
: [VAR[入力]] :  [VAR[入力]]
: [VAR[基底]] : [VAR[文書]]の[F[基底URL][文書の基底URL]]
: [VAR[符号化上書き]] : [VAR[文書]]の[F[文字符号化][文書の文字符号化]]
]FIG]
]FIG]

[54] [[環境設定群オブジェクト]][VAR[設定群]]に対して[[文字列]][VAR[入力]]を[[構文解析][URLの構文解析]]するには、
次のようにしなければ[MUST[なりません]] [SRC[>>23]]。
[FIG(steps)[
= [55] [[URL構文解析]]を実行した結果を返します。
[FIG(list members)[
: [VAR[入力]] :  [VAR[入力]]
: [VAR[基底]] : [VAR[設定群]]の[F[API基底URL]]
: [VAR[符号化上書き]] : [VAR[設定群]]の[F[API URL文字符号化]]
]FIG]
]FIG]

[56] これらが ([[失敗]]を返さない場合に) 返す 
[[URL記録]]を、[DFN[[RUBYB[結果URL記録]@en[resulting URL record]]]]といいます
[SRC[>>23]]。

[57] [[結果URL記録]]に [[URL直列化器]]を適用した結果を、
[DFN[[RUBYB[結果URL文字列]@en[resulting URL string]]]]といいます [SRC[>>23]]。

[59] [[URL構文解析器]]は、その他、[[URL分解属性]]を含め、様々な場所から呼び出されます。

* 基本 URL 構文解析器

[49] [DFN[[RUBYB[基本URL構文解析器]@en[basic URL parser]]]] [SRC[>>36]] は、
次の入力を受け取ります。
[FIG(list members)[
: [VAR[入力]] : [[文字列]]。
: [VAR[基底]] : [[基底URL]]を表す [[URL記録]]。省略可能。
: [VAR[符号化上書き]] : [[文字符号化]]。省略可能。
: [VAR[URL]] : [[URL記録]]、省略可能。
[[URL分解属性]]で使われます。
: [VAR[状態上書き]] : [[URL構文解析器]]の初期状態。省略可能。
[[URL分解属性]]で使われます。
]FIG]

[50] [[基本URL構文解析器]]は、
[VAR[URL]] が指定された場合、それを変更します。
指定されない場合、 [[URL記録]]または[[失敗]]を返します。
加えて、0個[[以上]]の[[構文違反]]を報告します。

[48] [[Webブラウザー]]以外で [CODE(URI)@en[blob:]] [[URL]] の処理を実装する必要がない場合は、
[[URL構文解析器]]ではなく、[[基本URL構文解析器]]を実装すれば十分です [SRC[>>36]]。

[60] [[Webブラウザー]]は基本的に [[URL構文解析器]]を呼び出すので、
それ以外で[[基本URL構文解析器]]が呼び出される場面はあまり無さそうです。

[61] [CODE(URI)@en[blob:]] [[URLの起源]]の決定で、[[基本URL構文解析器]]が呼び出されます。

* URL の構文解析、解決、比較と正準化

[33] [[URL Standard]] の登場まで、 [[URL]] (として解釈される文字列) 
に対する[[構文解析][URLの構文解析]]、[[解決][URLの解決]]、
[[比較][URLの比較]]と[[正準化][URLの正準化]]といった各[[演算]]の関係は明確に理解されていませんでした。

[34] [[URL Standard]] は[[構文解析][URLの構文解析]]、[[解決][URLの解決]]、
基本的な[[正準化][URLの正準化]]を1つの不可分の演算として改めて正確に定義し、
[[比較][URLの比較]]はその結果について 
(あるいは場合によっては文脈依存の更なる[[演算]]を経たものについて) 行うものとしました。

;; [35] [[比較]]の方法については、[[URLの比較]]も参照。

* モジュール指定子の解決

[25] [[モジュール指定子]]参照。

* 非妥当な URL の解決

[87] 
現在の [[URL]] の[[仕様書]]である [CITE[URL Standard]] は、
[[妥当なURL]]になっていないものも含む任意の[[文字列]]に対する[[URL構文解析器]]の動作を厳密に規定しています。
すべての[[文字列]]が、[[URL記録]]か[[失敗]]のいずれかに[[決定的]]に変換されます。

[86] 
[[HTML]] では [CODE[%s][%s (URL)]] や [CODE[%%][%% (URL)]]
のような特別な文字列が含まれる[[URL雛形]]が使われることがあります。
これは[[妥当なURL]]ではありませんが、[[URLの解決]]の[[演算]]が適用されることがあります。

* 関連

[88] 
[[XML型録]]による[[URLの解決][URLの解決 (XML型録)]]は、
本項のような[[相対URL]]の展開処理ではなく、
[[XML型録]]から [[URL]] を探す処理です。

* 歴史

** IRI の相対参照解決

[3] [[RIF]] は [[RFC 3986]] の[[算法]]を [[IRI]] に直接適用すると規定しています。

;; [CITE[RIF Datatypes and Built-Ins 1.0]] ([TIME[2010-06-22 23:52:50 +09:00]] 版) <http://www.w3.org/TR/2010/REC-rif-dtb-20100622/#Relative_IRIs>

[4] [[SSML 1.1]] の「[[URI]]」は [CODE(XML)@en[[[anyURI]]]] ですが、
[[RFC 3986]] の[[算法]]を (特に断り書きなしに) 適用すると規定しています。

;;[CITE@en[Speech Synthesis Markup Language (SSML) Version 1.1]] ([TIME[2010-09-08 00:26:19 +09:00]] 版) <http://www.w3.org/TR/2010/REC-speech-synthesis11-20100907/#S3.1.3.1>

** Open Packaging の相対参照解決

[2] [[Open Packaging]] は [[Unicode文字列]]を[[部分名]]に[[解決]]する方法を規定しています ([[ECMA 376]]
第2部附属書A)。[[部分名]]とは、 [[pack URI]] の [[path]] 部分のことです。
この[[解決]]は [[Unicode文字列]] → [[IRI]] → [[URI]] → [[部分名]]の3段階に分かれています。
最初の2つの段階については「[[IRI]]」の項を参照してください。
最後の [[URI]] → [[部分名]]の段階では、[[相対参照]]の[[解決]]が行われます
(同、 A.3)。
この[[解決]]の方法は [[RFC 3986]] の[[相対参照]]の[[解決]]よりも拡張されたものになっています。

= [CODE(char)[[['''[''']]]] と [CODE(char)[[[''']''']]]] を[[百分率符号化]]します
= [CODE(char)[[[%]]]] の後に[[十六進数]]2桁が続かない場合、[[百分率符号化]]します
= [[非予約文字]] ([[RFC 3986]] のもの?) に対する[[百分率符号化]]を[[復号]]します
= [CODE(char)[[[/]]]] と [CODE(char)[[[\]]]] の[[百分率符号化]]を[[復号]]します
= [CODE(char)[[[\]]]] を [CODE(char)[[[/]]]] に変換します
= [CODE(char)[[[.]]]] 以外の[[文字]]を含んだ [[segment]]
それぞれについて、末尾に [CODE(char)[[[.]]]] があればすべて除去します
= [CODE(char)[[[/]]]] の連続を1つの [CODE(char)[[[/]]]] に置き換えます
= 末尾に1つ [CODE(char)[[[/]]]] があれば、除去します
= 3つ[[以上]]の [CODE(char)[[[.]]]] から成る [[segment]] 全体を除去します
= [[RFC 3986]] の方法で[[相対参照]]として[[解決]]し、得られた [[path]] の部分が[[部分名]]です

** 素片識別子の扱い

[1] 基底 [SAMP(URI)[http://foo.example/#bar]] で相対 URI 参照 [SAMP(URI)[?]] を解決すると [SAMP(URI)[http://foo.example/?]] になる実装と [SAMP(URI)[http://foo.example/?#bar]] になる実装がある。

** メモ

[5] [CITE@EN[XQuery 3.0: An XML Query Language]]
( ([TIME[2014-04-08 08:26:21 +09:00]] 版))
<http://www.w3.org/TR/xquery-30/#id-resolve-relative-uri>

[6] [CITE@EN[XML Path Language (XPath) 3.0]]
( ([TIME[2014-04-08 07:58:50 +09:00]] 版))
<http://www.w3.org/TR/xpath-30/#dt-resolve-relative-uri>

[7] [CITE@EN[XPath and XQuery Functions and Operators 3.0]]
( ([TIME[2014-04-08 07:02:07 +09:00]] 版))
<http://www.w3.org/TR/xpath-functions-3/#func-resolve-uri>

[8] [CITE@en[Canonical XML Version 2.0]]
( ([TIME[2010-09-02 01:31:32 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-xml-c14n2-20100831/>

[9] [CITE@EN[XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition)]]
( ([TIME[2010-12-17 00:06:54 +09:00]] 版))
<http://www.w3.org/TR/2010/REC-xpath-functions-20101214/#func-resolve-uri>

[10] [CITE@EN[SPARQL 1.1 Query Language]]
( ([TIME[2013-03-21 20:27:53 +09:00]] 版))
<http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#relIRIs>

[11] [CITE@en[Live URL Resolution Viewer]] ([CODE[2008-07-05 22:53:22 +09:00]] 版) <http://suika.fam.cx/www/url/urlresolution>

[12] [CITE@ja[冬様もすなる☆日記というもの (2008年7月)]] ([[わかば]] 著, [TIME[2008-07-06 00:10:37 +09:00]] 版) <http://suika.fam.cx/~wakaba/d/d200807#d6-1>


[13] [CITE[OASIS Open Document Format for Office Applications (OpenDocument) Version 1.2 - Part 3: Packages]]
([TIME[2011-09-29 13:00:00 +09:00]] 版)
<http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part3.html#a3_7Usage_of_IRIs_Within_Packages>

[14] [CITE@en[Support fragments as long as base URL is non-null. Fixes https://www.… · whatwg/url@7468c39]]
([TIME[2015-06-16 15:10:06 +09:00]] 版)
<https://github.com/whatwg/url/commit/7468c397f600b72f650f52fc02466f051bf96ad3>

[15] [CITE@en[Fix fragment against no relative scheme base URL again. · whatwg/url@7f5036c]]
([TIME[2015-06-17 16:53:02 +09:00]] 版)
<https://github.com/whatwg/url/commit/7f5036c15e1f09ec37c850bbec5f3bedc418a451>

[16] [CITE@en[Support relative URLs for unknown schemes. Please review! Fixes https… · whatwg/url@b266a43]]
([TIME[2015-06-18 19:12:49 +09:00]] 版)
<https://github.com/whatwg/url/commit/b266a43fc9df0e8607074bd4d336a517e2010009>

[17] [CITE@en[Remove the "element's base URL" indirection · whatwg/html@199c0c0]]
([TIME[2015-12-19 11:03:40 +09:00]] 版)
<https://github.com/whatwg/html/commit/199c0c0569bc0e312bb70bffa8ef2f85231f4cd1>

[18] [CITE@en[Clarify callers of the 'resolve a URL' algorithm · whatwg/html@7c2db6f]]
([TIME[2016-01-09 12:07:04 +09:00]] 版)
<https://github.com/whatwg/html/commit/7c2db6f8c24f8c20fa362ee49433de966330a1fe>

[19] [CITE@en[Fix #77: always decode "%2e" in a URL's path · whatwg/url@bee5ad8]]
([TIME[2016-01-15 18:56:12 +09:00]] 版)
<https://github.com/whatwg/url/commit/bee5ad8041adfe6fc676c527bbc3f3cf4562ef67>

[20] [CITE@en[Drop dependencies on Encoding Standard's decoder concept · whatwg/url@37f9329]]
([TIME[2016-02-11 12:01:12 +09:00]] 版)
<https://github.com/whatwg/url/commit/37f932928378c0df521034cfd223f4ba603ef476>

[21] [CITE@en[Use the "get an output encoding" from the Encoding Standard · whatwg/url@a9197f7]]
([TIME[2016-02-11 12:03:32 +09:00]] 版)
<https://github.com/whatwg/url/commit/a9197f7714e6b125f1f760ca1aa661530261773c>

[22] [CITE@en[Update integration with Encoding Standard · whatwg/html@6a31c26]]
([TIME[2016-02-14 18:45:01 +09:00]] 版)
<https://github.com/whatwg/html/commit/6a31c26cf12e39dab1a488e75dd56c03d6786d39>

[24] [CITE@en[URLs are parsed and produce records · whatwg/html@30bc255]]
([TIME[2016-02-14 22:49:31 +09:00]] 版)
<https://github.com/whatwg/html/commit/30bc2557105ad62881ec9670f253febbc9761b44>

[26] [CITE@en[Fix #823: Don't strip characters from the URL in meta refresh · whatwg/html@543d8c1]]
([TIME[2016-03-08 18:30:02 +09:00]] 版)
<https://github.com/whatwg/html/commit/543d8c1598bf5bff0b8febc50dff11dcb42f8768>

[27] [CITE@en[Fix #101: always strip U+0009, U+000A, and U+000D · whatwg/url@7b40216]]
([TIME[2016-03-08 18:33:29 +09:00]] 版)
<https://github.com/whatwg/url/commit/7b40216f809c7fe3c9a1680b5c1b06a771c9ebd8>

[28] [CITE@en[Stop after setting an url’s query to null · whatwg/url@4f1c2dd]]
([TIME[2016-04-15 17:42:12 +09:00]] 版)
<https://github.com/whatwg/url/commit/4f1c2ddbdb866b1150819622ec04a86813294059>

[29] [CITE@en[curl handling of HTTP 301 redirection fails when response location header starts with http:///<domain> (3 slashes between protocol and domain)) · Issue #791 · curl/curl]]
( ([TIME[2016-05-10 20:23:27 +09:00]]))
<https://github.com/curl/curl/issues/791>

[30] [CITE@en[Issue 385645 - chromium - Security: Multiple leading slashes in URLs may confuse some server-side XSS filters - Monorail]]
( ([TIME[2016-05-10 20:26:39 +09:00]]))
<https://bugs.chromium.org/p/chromium/issues/detail?id=385645>

[FIG(quote)[
[FIGCAPTION[
[31] [CITE[cURL - How To Use]]
( ([TIME[2016-05-31 06:05:05 +09:00]]))
<https://curl.haxx.se/docs/manpage.html#--path-as-is>
]FIGCAPTION]

> --path-as-is
> Tell curl to not handle sequences of /../ or /./ in the given URL path. Normally curl will squash or merge them according to standards but with this option set you tell it not to do that.

]FIG]

[32] [CITE@en[Fix #521: all URLs can be relative · whatwg/html@e99f0bd]]
([TIME[2016-01-19 10:49:50 +09:00]] 版)
<https://github.com/whatwg/html/commit/e99f0bd112e0216698bf9397b64b3f8064995756>

[58] [CITE@en[Point out that the basic URL parser is for everyone. Fixes https://ww… · whatwg/url@9dbbde1]]
([TIME[2015-06-19 18:22:35 +09:00]] 版)
<https://github.com/whatwg/url/commit/9dbbde11609d351dfed9b6ee066de9d32b164148>


[62] [CITE@en[Bug 161364 – URLParser should handle relative URLs that start with //]]
([TIME[2016-09-01 12:19:27 +09:00]])
<https://bugs.webkit.org/show_bug.cgi?id=161364>

[63] [CITE@en[1064700 – Determine which characters need to be percent encoded]]
([TIME[2016-09-01 12:22:13 +09:00]])
<https://bugzilla.mozilla.org/show_bug.cgi?id=1064700>

[FIG(quote)[
[FIGCAPTION[
[64] [CITE[Release Notes for Safari Technology Preview 17 | WebKit]]
( ([TIME[2016-11-10 10:08:39 +09:00]]))
<https://webkit.org/blog/7071/release-notes-for-safari-technology-preview-17/>
]FIGCAPTION]

> Matched the behavior of the old URL parser when %2E is in the URL path (r207805)
> Prevented interpreting host of URLs with unrecognized schemes as an IPv4 address (r208086)

]FIG]


[65] [CITE@en[Percent encode fragments too]]
([[annevk]]著, [TIME[2016-12-10 02:43:08 +09:00]])
<https://github.com/whatwg/url/commit/373dbedbbf0596f723ce8a195923da98b698aeb0>

[66] [CITE@en[No need for null passwords]]
([[annevk]]著, [TIME[2017-01-04 02:31:30 +09:00]])
<https://github.com/whatwg/url/commit/5e0b05e95a81fdd539c7b1bf97e69b3df701384f>

[67] [CITE@en[Stop decoding all %2e's in paths]]
([[annevk]]著, [TIME[2016-10-28 20:46:47 +09:00]])
<https://github.com/whatwg/url/commit/fbff6834a8a03576261f777d0e0afea5c1bc5a09>

[68] [CITE@en[Return failure in state override scheme parsing]]
([[annevk]]著, [TIME[2017-01-03 23:33:47 +09:00]])
<https://github.com/whatwg/url/commit/4617e33b27d386bbf1db8c04316961d46aaa1397>

[FIG(quote)[
[FIGCAPTION[
[69] [CITE@en[FFmpeg Protocols Documentation]]
([TIME[2017-01-22 02:22:36 +09:00]])
<https://ffmpeg.org/ffmpeg-protocols.html#file>
]FIGCAPTION]

> An URL that does not have a protocol prefix will be assumed to be a file URL. Depending on the build, an URL that looks like a Windows path with the drive letter at the beginning will also be assumed to be a file URL (usually not the case in builds for unix-like systems).

]FIG]


[70] [CITE@en[Add opaque hosts]]
([[annevk]]著, [TIME[2017-01-25 04:51:54 +09:00]])
<https://github.com/whatwg/url/commit/30362553e9ce9fc706d3492bd61886e399fc94e2>

[71] [CITE@en[Change path parsing for non-special URLs]]
([[annevk]]著, [TIME[2017-01-31 19:41:51 +09:00]])
<https://github.com/whatwg/url/commit/b087fe2ab215caf656a94b067c9a69ae78f03c8f>

[72] [CITE@en[File state did not correctly deal with lack of base URL]]
([[annevk]]著, [TIME[2017-02-07 18:01:33 +09:00]])
<https://github.com/whatwg/url/commit/698f3e8f1d7de6d84c78ac81209fd780aca5ab7e>

[73] [CITE@en[Meta: state idempotence clearly as a goal]]
([[annevk]]著, [TIME[2017-02-09 00:04:43 +09:00]])
<https://github.com/whatwg/url/commit/6688baa5a3032a0acdb2149c41aef64b30106802>

[74] [CITE@en[Cleanup API for file and non-special URLs]]
([[annevk]]著, [TIME[2017-02-09 03:31:21 +09:00]])
<https://github.com/whatwg/url/commit/cf616f9d3fca44bd5329e992519a4236a39b0cb7>

[75] [CITE@en[Editorial: use the Infra Standard for URL's path]]
([[annevk]]著, [TIME[2017-02-10 02:32:12 +09:00]])
<https://github.com/whatwg/url/commit/2f99502dc12b781f5bf6a062257ba031c7129c1e>

[76] [CITE@en[Paths need to be copied from base URLs]]
([[annevk]]著, [TIME[2017-02-11 03:23:51 +09:00]])
<https://github.com/whatwg/url/commit/cdbe5dcf40c5c98d46c0a4a9b8984914eba38c2f>

[77] [CITE@en[Attempt to explain valid input better]]
([[annevk]]著, [TIME[2017-02-10 17:10:23 +09:00]])
<https://github.com/whatwg/url/commit/50cb9ab9d8f70cc2bc72e91976bfaea0ad0fd330>

[78] [CITE@en[A file URL cannot have credentials]]
([[annevk]]著, [TIME[2017-02-16 20:14:28 +09:00]])
<https://github.com/whatwg/url/commit/9b2eb10eb8436adaf6620b1864b25442152f205b>

[79] [CITE@en[Add empty host concept for file and non-special URLs]]
([[rmisev]]著, [TIME[2017-03-07 23:12:16 +09:00]])
<https://github.com/whatwg/url/commit/5807b28261e44a47e31683230137da395ddc79d8>

[80] [CITE@en[Restrict protocol around "file"]]
([[annevk]]著, [TIME[2017-03-15 17:37:07 +09:00]])
<https://github.com/whatwg/url/commit/462fdc14732aae4b0b9c5334f37962d8c235caf9>

[81] [CITE@EN[XQuery 3.1: An XML Query Language]]
([TIME[2017-03-20 09:23:33 +09:00]])
<https://www.w3.org/TR/2017/REC-xquery-31-20170321/#dt-resolve-relative-uri>

[82] [CITE@EN[XML Path Language (XPath) 3.1]]
([TIME[2017-03-20 09:18:04 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-31-20170321/#dt-resolve-relative-uri>

[83] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-03-21 16:02:06 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#func-resolve-uri>

[84] [CITE@en[URL: trim leading slashes of file URL paths]]
([[annevk]]著, [TIME[2017-03-22 19:31:00 +09:00]])
<https://github.com/whatwg/url/commit/6103e0a58eb2460d409056fb2b93b015941b64f2>

[85] [CITE@en[Fix Windows drive letter handling in the file state]]
([[rmisev]]著, [TIME[2017-05-03 16:16:22 +09:00]])
<https://github.com/whatwg/url/commit/fe6b251739e225555f04319f19c70c031a5d99eb>

[89] [CITE@en[Normalize port after updating scheme]]
([[TimothyGu]]著, [TIME[2017-06-30 09:05:07 +09:00]])
<https://github.com/whatwg/url/commit/0f53958338bbaec3882f902897873da59ba7e8bd>

[90] [CITE@en[Deprecations and Removals in Chrome 61  |  Web  |  Google Developers]]
([TIME[2017-08-16 00:56:37 +09:00]])
<https://developers.google.com/web/updates/2017/08/chrome-61-deprecations>

[91] [CITE@en[Fix Windows drive letter handling in the file slash state]]
([[rmisev]]著, [TIME[2017-09-18 18:50:56 +09:00]])
<https://github.com/whatwg/url/commit/2eef975e989cb5ae2d62467394778fd6778ddec9>

[92] [CITE@en[Drive letters get duplicated when resolving Windows file: URL with base · Issue #303 · whatwg/url]]
([TIME[2017-09-19 16:02:59 +09:00]])
<https://github.com/whatwg/url/issues/303>

[93] [CITE@en[remaining variable ambiguity · Issue #308 · whatwg/url]]
([TIME[2017-09-19 16:03:41 +09:00]])
<https://github.com/whatwg/url/issues/308>

[94] [CITE@en[Fix Windows drive letter handling in the file slash state by rmisev · Pull Request #343 · whatwg/url]]
([TIME[2017-09-19 16:04:07 +09:00]])
<https://github.com/whatwg/url/pull/343>

[95] [CITE@en[Meta: disambiguate links to "resolve"]]
([[ricea]]著, [TIME[2018-02-10 00:27:25 +09:00]])
<https://github.com/whatwg/streams/commit/47eab2faf0af026a33bd22abe3af583edbdbceb9>

[96] [CITE@en[Disambiguate links to "resolve" by ricea · Pull Request #878 · whatwg/streams]]
([TIME[2018-02-11 17:37:30 +09:00]])
<https://github.com/whatwg/streams/pull/878>

[97] [CITE@en[Change query state slightly to better deal with non-UTF-8 encodings]]
([[annevk]]著, [TIME[2018-05-09 17:55:15 +09:00]])
<https://github.com/whatwg/url/commit/f0e4390bf882446445e944215524ff3877aac95a>

[98] [CITE@en["html" error mode somewhat incompatible with URLs · Issue #139 · whatwg/encoding]]
([TIME[2018-05-26 00:01:28 +09:00]])
<https://github.com/whatwg/encoding/issues/139>

[99] [CITE@en[Change query state slightly to better deal with non-UTF-8 encodings by annevk · Pull Request #386 · whatwg/url]]
([TIME[2018-05-26 00:01:53 +09:00]])
<https://github.com/whatwg/url/pull/386>

[100] [CITE@en[Editorial: avoid setting encoding multiple times]]
([[annevk]]著, [TIME[2018-05-09 17:22:37 +09:00]])
<https://github.com/whatwg/url/commit/b385374e5d1b48f82b8040395786469ae655f435>

[101] [CITE@en[Percent-encode ' in queries of URLs with special schemes]]
([[achristensen07]]著, [TIME[2018-06-08 16:46:29 +09:00]])
<https://github.com/whatwg/url/commit/6ef17ebe1220a7e7c0cfff0785017502ee18808b>

[102] [CITE@en[percent-encode ' in queries of URLs with special schemes · Issue #348 · whatwg/url]]
([TIME[2018-06-11 23:47:32 +09:00]])
<https://github.com/whatwg/url/issues/348>

[103] [CITE@en[percent-encode ' in queries of URLs with special schemes by achristensen07 · Pull Request #395 · whatwg/url]]
([TIME[2018-06-11 23:49:19 +09:00]])
<https://github.com/whatwg/url/pull/395>

[104] [CITE@en[Change query state slightly to better deal with non-UTF-8 encodings]]
([[annevk]]著, [TIME[2018-05-09 17:55:15 +09:00]])
<https://github.com/whatwg/url/commit/f0e4390bf882446445e944215524ff3877aac95a>

[105] [CITE@en["html" error mode somewhat incompatible with URLs · Issue #139 · whatwg/encoding]]
([TIME[2019-02-25 17:23:18 +09:00]])
<https://github.com/whatwg/encoding/issues/139>

[106] [CITE@en[Change query state slightly to better deal with non-UTF-8 encodings by annevk · Pull Request #386 · whatwg/url]]
([TIME[2019-02-25 17:30:10 +09:00]])
<https://github.com/whatwg/url/pull/386>

[107] [CITE@en[Editorial: avoid setting encoding multiple times]]
([[annevk]]著, [TIME[2018-05-09 17:22:37 +09:00]])
<https://github.com/whatwg/url/commit/b385374e5d1b48f82b8040395786469ae655f435>

[108] [CITE@en[Use File API to resolve blob: URLs and their origins]]
([[mkruisselbrink]]著, [TIME[2019-01-14 23:24:01 +09:00]])
<https://github.com/whatwg/url/commit/d2ef633869b3f31d8c7e3bb76602400e4d2c126c>



[46] [CITE[curl - How To Use]]
([TIME[2020-09-21T09:01:13.000Z]], [TIME[2020-10-01T06:25:16.113Z]])
<https://curl.haxx.se/docs/manpage.html#--path-as-is>



- [109] [CITE@en[urllib.parse space handling CVE-2023-24329 appears unfixed · Issue #102153 · python/cpython · GitHub]], [TIME[2023-08-17T06:26:41.000Z]] <https://github.com/python/cpython/issues/102153>
- [110] [CITE@en[NVD - CVE-2023-24329]], [TIME[2023-08-17T06:26:52.000Z]] <https://nvd.nist.gov/vuln/detail/CVE-2023-24329>

[111] 
>>109 [[URL Standard]] 以前に長らく明確な構文解析の仕様が存在しなかったことが脆弱性の遠因にある。
[[URL Standard]] の成立後に放置してきたのは [[Python]] コミュニティーの責任だが。
[[構文解析]]の挙動を明確に定めることが[[相互運用性]]のみならず[[セキュリティー]]のため重要であることを実証する一例。


[112] 
[[構文]]は[[生成規則]]を提示するだけで、あとは[[Postel則]]でなるに任せる、という20世紀の
[[IETF]] の設計論の破綻の一例でもある。


[113] [CITE@en[HISTORY & SECURITY: URL Parsing Differences Between Implementations Security Issues · Issue #766 · whatwg/url · GitHub]], [TIME[2023-08-22T05:37:18.000Z]] <https://github.com/whatwg/url/issues/766>

