<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <dfn><code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Slug</anchor>:</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">頭欄</anchor></dfn>は、
作成される<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">資源</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> の決定時のヒントを表します。</p><section><h1>仕様書</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <cite xml:lang="en">RFC 5023 - The Atom Publishing Protocol</cite> <ul><li><anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc5023#section-9.7">https://tools.ietf.org/html/rfc5023#section-9.7</anchor-external></li><li><anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc5023#section-16.3">https://tools.ietf.org/html/rfc5023#section-16.3</anchor-external></li></ul></li></ul></refs></section><section><h1>意味</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Slug</anchor>:</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">欄</anchor>が <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">POST</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>に含まれている場合、その値は作成される<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">エントリー資源</anchor>や<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">媒体資源</anchor>が通常<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">取り出し</anchor>される際に使われる
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URI</anchor> の一部分として<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">クライアント</anchor>が望む値を表します。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">AtomPub</anchor></src></p></section><section><h1>構文</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">AtomPub</anchor> より:</p><blockquote><pre>       LWS      = &lt;defined in Section 2.2 of [RFC2616]&gt;
       slugtext = %x20-7E | LWS
       Slug     = &quot;Slug&quot; &quot;:&quot; *slugtext</pre></blockquote><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> 値は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3629</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">UTF-8</anchor> で<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号化</anchor>し、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">百分率符号化</anchor>を施した値とされています。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">AtomPub</anchor></src></p></section><section><h1>文脈</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">AtomPub</anchor> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>で使われます。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> それ以外でも稀に使われるようです (<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;8</anchor-internal>、<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;10</anchor-internal>)。</p></section><section><h1>処理</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>は新しく作成する<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">資源</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">成員URI</anchor> を作成する時にこの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">欄</anchor>の値を使って<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">構いません</strong></anchor>。
例えば、その値の一部または全部を <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URI</anchor> の最後の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">segment</anchor> に使うことができます。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>は <code class="XMLe" xml:lang="en">atom:<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">id</anchor></code> や<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">媒体リンク・エントリー</anchor>の <code class="XML" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">title</anchor></code>
にも使って<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">構いません</strong></anchor>。<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>はこの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">欄</anchor>を無視しても<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">構いません</strong></anchor>。
値の一部の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor>を置き換えるなど変形させても<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">構いません</strong></anchor>。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">AtomPub</anchor></src></p></section><section><h1>例</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">AtomPub</anchor> より</p><pre class="HTTP example code">       POST /myblog/entries HTTP/1.1
       Host: example.org
       Content-Type: image/png
       Slug: The Beach at S%C3%A8te
       Authorization: Basic ZGFmZnk6c2VjZXJldA==
       Content-Length: nnn

       ...binary data...</pre></section><section><h1>関連</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">フォーム提出</anchor>など <code class="MIME" xml:lang="en">multipart/form-data</code> で<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ファイル</anchor>を送信する場合には、
<code class="MIME" xml:lang="en">Content-Disposition</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>の <code class="MIME" xml:lang="en">filename</code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">引数</anchor>で<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ファイル名</anchor>が指定されますから、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">サーバー</anchor>はそれを<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヒント</anchor>に使えます。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ダウンロード</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ファイル名</anchor>の指定には、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>の
<code class="HTTP" xml:lang="en">Content-Disposition:</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>の
<code class="MIME" xml:lang="en">filename</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">引数</anchor>や、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">リンク元</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor>
の <code class="HTMLe" xml:lang="en">a</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素</anchor>の <code class="HTMLa" xml:lang="en">download</code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">属性</anchor>が使えます。</p></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <cite>Protocol Guide (v3.0) - Google Documents List Data API v3.0 - Google Code</cite>
(<time>2009-10-10 03:25:53 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://code.google.com/intl/ja-JP/apis/documents/docs/3.0/developers_guide_protocol.html">http://code.google.com/intl/ja-JP/apis/documents/docs/3.0/developers_guide_protocol.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite xml:lang="en">Developer's Guide: JSON-C / JavaScript - YouTube — Google Developers</cite>
( (<time>2013-09-12 18:53:20 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developers.google.com/youtube/2.0/developers_guide_jsonc?hl=ja&amp;csw=1">https://developers.google.com/youtube/2.0/developers_guide_jsonc?hl=ja&amp;csw=1</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <cite xml:lang="en">Linked Data Platform 1.0</cite>
(<time>2015-02-27 16:17:29 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp.html#h-ldpc-post-slug">https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp.html#h-ldpc-post-slug</anchor-external></figcaption><blockquote><p>5.2.3.10 LDP servers may allow clients to suggest the URI for a resource created through POST, using the HTTP Slug header as defined in <strong>[</strong>RFC5023<strong>]</strong>. LDP adds no new requirements to this usage, so its presence functions as a client hint to the server providing a desired string to be incorporated into the server's final choice of resource URI.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite xml:lang="en">Web Annotation Protocol</cite>
(<time>2017-02-24 02:14:26 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://w3c.github.io/web-annotation/protocol/wd/#h-suggesting-an-iri-for-an-annotation">https://w3c.github.io/web-annotation/protocol/wd/#h-suggesting-an-iri-for-an-annotation</anchor-external></figcaption><blockquote><p>The IRI path segment that is appended to the Container IRI for a resource may be suggested by the Annotation Client by using the Slug HTTP header on the request when the resource is created. The server should use this name, so long as it does not already identify an existing resource, but may  ignore it and use an automatically assigned name.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> <cite xml:lang="en">OSLC Core Version 3.0. Part 5: Attachments</cite>
(<time>2017-04-05 01:00:00 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.oasis-open.org/oslc-core/oslc-core/v3.0/cs01/part5-attachments/oslc-core-v3.0-cs01-part5-attachments.html">http://docs.oasis-open.org/oslc-core/oslc-core/v3.0/cs01/part5-attachments/oslc-core-v3.0-cs01-part5-attachments.html</anchor-external></figcaption><blockquote><p>5.4.2 Clients may use the HTTP Slug request header <strong>[</strong>RFC5023<strong>]</strong> to suggest a name when creating an attachment. If present, the Slug header should not include a file extension.</p></blockquote></figure></section></body></html>