No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0370.xml 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Jingle HTTP Transport Method</title>
  10. <abstract>This specification defines two Jingle transport methods for establishing HTTP connections for either uploading or downloading data.</abstract>
  11. &LEGALNOTICE;
  12. <number>0370</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0166</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>NOT_YET_ASSIGNED</shortname>
  24. &lance;
  25. <revision>
  26. <version>0.2</version>
  27. <date>2017-09-11</date>
  28. <initials>XEP Editor (jwi)</initials>
  29. <remark>Defer due to lack of activity.</remark>
  30. </revision>
  31. <revision>
  32. <version>0.1</version>
  33. <date>2016-01-12</date>
  34. <initials>XEP Editor (mam)</initials>
  35. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  36. </revision>
  37. <revision>
  38. <version>0.0.2</version>
  39. <date>2016-01-07</date>
  40. <initials>ljts</initials>
  41. <remark><p>Renamed &lt;uploaded/&gt; to &lt;completed/&gt;, and made it a child of the &lt;transport/&gt; element in transport-info events.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.0.1</version>
  45. <date>2015-07-30</date>
  46. <initials>ljts</initials>
  47. <remark><p>First draft.</p></remark>
  48. </revision>
  49. </header>
  50. <section1 topic='Introduction' anchor='intro'>
  51. <p>&xep0166; defines a framework for negotiating and managing out-of-band data sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor application formats, leaving that up to separate specifications.</p>
  52. <p>The current document defines two transport methods for establishing and managing data exchanges between XMPP entities using the Hyper Text Transfer Protocol (HTTP, see &rfc2616;); one method is for sharing via pulling data from an HTTP URI (http-download), and the other is for sharing via pushing data to an HTTP URI (http-upload).</p>
  53. </section1>
  54. <section1 topic='Requirements' anchor='reqs'>
  55. <p>Historically, &xep0066; has been used to trigger downloading files via HTTP, as well as initiating the use of any other known URI scheme. However, it has several limitations:</p>
  56. <ul>
  57. <li>It only allows for the downloading of files via HTTP, not uploading.</li>
  58. <li>It can not specify any additional headers that might be necessary for downloading files (authentication tokens, etc).</li>
  59. <li>The allowance of any URI scheme makes it too unwieldy to be integrated into Jingle the way SOCKS5 Bytestreams and In-Band Bytestreams were (see &xep0260; and &xep0261;).</li>
  60. </ul>
  61. <p>As such, this document defines two Jingle mechanisms designed to meet the following requirements:</p>
  62. <ul>
  63. <li>Allow for both uploading and downloading of data via HTTP.</li>
  64. <li>Allow additional HTTP headers to be specified.</li>
  65. <li>Restrict the URI scheme to HTTP/HTTPS.</li>
  66. </ul>
  67. </section1>
  68. <section1 topic='Jingle Conformance' anchor='conformance'>
  69. <p>In accordance with Section 12 of <cite>XEP-0166</cite>, this document specifies the following information related to both the Jingle http-download and http-upload transport methods:</p>
  70. <ol>
  71. <li><p>The transport negotiation process for http-download is defined in the <link url='#download'>Negotiating HTTP Download</link> section of this document, and the negotation process for http-upload is defined in the <link url='#upload'>Negotiating HTTP Upload</link> section of this document.</p></li>
  72. <li><p>The semantics of the &TRANSPORT; element are defined in the <link url='#download'>Negotiating HTTP Download</link> and <link url='#upload'>Negotiating HTTP Upload</link> sections of this document.</p></li>
  73. <li><p>Successful negotiation of both the http-download and http-upload methods results in use of a streaming transport method suitable for use in Jingle application types where packet loss cannot be tolerated (e.g., file transfer).</p></li>
  74. <li><p>Multiple components are not supported by http-download or http-upload.</p></li>
  75. </ol>
  76. </section1>
  77. <section1 topic='Negotiating HTTP Download' anchor='download'>
  78. <p>Negotiating HTTP downloads is done by using a &TRANSPORT; element with the 'urn:xmpp:jingle:transports:http:0' namespace, &VNOTE;. This element MAY include &lt;candidate/&gt; elements which represent URIs where data can be downloaded. Each &lt;candidate/&gt; element MUST include a 'uri' attribute, and MAY contain &lt;header/&gt; elements whose 'name' attribute is an HTTP header and whose text content is the HTTP header value.</p>
  79. <code><![CDATA[
  80. <transport xmlns='urn:xmpp:jingle:transports:http:0'>
  81. <candidate uri='https://files.montague.example/ERUN8970'>
  82. <header name='authorization'>Bearer 7472327205ffb74d10b11363044d8c24e3ddba12</header>
  83. </candidate>
  84. </transport>]]></code>
  85. <p>Multiple candidates MAY be provided, indicating that there are multiple URIs from which the data can be retrieved (e.g. multiple candidates could be included to list the primary URI of a file along with several known mirrors).</p>
  86. <code><![CDATA[
  87. <transport xmlns='urn:xmpp:jingle:transports:http:0'>
  88. <candidate uri='https://files.montague.example/ERUN8970' />
  89. <candidate uri='https://mirror1.montague.example/ERUN8970' />
  90. <candidate uri='https://mirror2.montague.example/ERUN8970' />
  91. </transport>]]></code>
  92. <p>The generation of candidates is based on the Jingle content senders, and only the parties specified to send data SHOULD provide candidates.</p>
  93. <p>Upon receiving an HTTP download candidate, parties that are to receive data (based on the Jingle content senders) SHOULD use an HTTP GET request to the candidate URI to fetch the data.</p>
  94. <p>Entities MAY initially provide an empty set of candidates if a suitable download URI is not yet known; advertising candidates later is done with transport-info actions.</p>
  95. <table caption='Summary of Roles in Jingle HTTP Download'>
  96. <tr>
  97. <th>Content Creator</th>
  98. <th>Content Senders</th>
  99. <th>Who Sends Download Candidates</th>
  100. <th>Who performs HTTP GET</th>
  101. </tr>
  102. <tr>
  103. <td rowspan='4'>initiator</td>
  104. <td>initiator</td>
  105. <td>initiator</td>
  106. <td>responder</td>
  107. </tr>
  108. <tr>
  109. <td>responder</td>
  110. <td>responder</td>
  111. <td>initiator</td>
  112. </tr>
  113. <tr>
  114. <td>both</td>
  115. <td>both</td>
  116. <td>both</td>
  117. </tr>
  118. <tr>
  119. <td>none</td>
  120. <td>none</td>
  121. <td>none</td>
  122. </tr>
  123. <tr>
  124. <td rowspan='4'>responder</td>
  125. <td>initiator</td>
  126. <td>initiator</td>
  127. <td>responder</td>
  128. </tr>
  129. <tr>
  130. <td>responder</td>
  131. <td>responder</td>
  132. <td>initiator</td>
  133. </tr>
  134. <tr>
  135. <td>both</td>
  136. <td>both</td>
  137. <td>both</td>
  138. </tr>
  139. <tr>
  140. <td>none</td>
  141. <td>none</td>
  142. <td>none</td>
  143. </tr>
  144. </table>
  145. </section1>
  146. <section1 topic='Negotiating HTTP Upload' anchor='upload'>
  147. <p>Negotiating HTTP uploads is done by using a &TRANSPORT; element with the 'urn:xmpp:jingle:transports:http:upload:0' namespace, &VNOTE;. This element MAY include a &lt;candidate/&gt; element which represents a URI where data can be uploaded. The &lt;candidate/&gt; element MUST include a 'uri' attribute, and MAY contain &lt;header/&gt; elements whose 'name' attribute is an HTTP header and whose text content is the HTTP header value.</p>
  148. <code><![CDATA[
  149. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  150. <candidate uri='https://files.montague.example/ERUN8970'>
  151. <header name='authorization'>Bearer 7472327205ffb74d10b11363044d8c24e3ddba12</header>
  152. </candidate>
  153. </transport>]]></code>
  154. <p>The generation of candidates is based on the Jingle content senders, and only the parties specified to receive data SHOULD provide candidates.</p>
  155. <p>Upon receiving an HTTP upload candidate, parties that are to send data (based on the Jingle content senders) SHOULD use an HTTP PUT request to the candidate URI, where the request body is the data to be transferred.</p>
  156. <table caption='Summary of Roles in Jingle HTTP Upload'>
  157. <tr>
  158. <th>Content Creator</th>
  159. <th>Content Senders</th>
  160. <th>Who Sends Upload Candidates</th>
  161. <th>Who Performs HTTP PUT</th>
  162. </tr>
  163. <tr>
  164. <td rowspan='4'>initiator</td>
  165. <td>initiator</td>
  166. <td>responder</td>
  167. <td>initiator</td>
  168. </tr>
  169. <tr>
  170. <td>responder</td>
  171. <td>initiator</td>
  172. <td>responder</td>
  173. </tr>
  174. <tr>
  175. <td>both</td>
  176. <td>both</td>
  177. <td>both</td>
  178. </tr>
  179. <tr>
  180. <td>none</td>
  181. <td>none</td>
  182. <td>none</td>
  183. </tr>
  184. <tr>
  185. <td rowspan='4'>responder</td>
  186. <td>initiator</td>
  187. <td>responder</td>
  188. <td>initiator</td>
  189. </tr>
  190. <tr>
  191. <td>responder</td>
  192. <td>initiator</td>
  193. <td>responder</td>
  194. </tr>
  195. <tr>
  196. <td>both</td>
  197. <td>both</td>
  198. <td>both</td>
  199. </tr>
  200. <tr>
  201. <td>none</td>
  202. <td>none</td>
  203. <td>none</td>
  204. </tr>
  205. </table>
  206. <p>See <link url='#upload-complete'>Upload Complete</link> for signaling that the upload process has been completed.</p>
  207. </section1>
  208. <section1 topic='Informational Messages' anchor='info'>
  209. <section2 topic='Upload Complete'>
  210. <p>A common case for using http-upload is to delegate the storage of the uploaded data to an external hosting service, which means that the receiver might not have the direct ability to know when the uploaded data is ready.</p>
  211. <p>As such, when an upload transfer is used, the party uploading content SHOULD signal when the upload has completed by sending a Jingle transport-info event that specifies the content for which uploading has completed, and includes a &lt;transport/&gt; element qualified by the 'urn:xmpp:jingle:transports:http:upload:0' namespace, which in turn contains a &lt;completed /&gt; element.</p>
  212. <example caption='Signaling that the upload has completed'><![CDATA[
  213. <iq from='romeo@montague.lit/orchard'
  214. id='uw72g176'
  215. to='juliet@capulet.lit/balcony'
  216. type='set'>
  217. <jingle xmlns='urn:xmpp:jingle:1'
  218. action='transport-info'>
  219. <content creator='initiator' name='file-upload'>
  220. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  221. <completed />
  222. </transport>
  223. </content>
  224. </jingle>
  225. </iq>]]></example>
  226. </section2>
  227. </section1>
  228. <section1 topic='Examples'>
  229. <section2 topic='Offering a File using HTTP Download'>
  230. <p>Here, Romeo is offering to send a file to Juliet, so he includes a download URI candidate with his session-initiate.</p>
  231. <example caption='Offering a file with a download URI'><![CDATA[
  232. <iq from='romeo@montague.lit/orchard'
  233. id='nzu25s8'
  234. to='juliet@capulet.lit/balcony'
  235. type='set'>
  236. <jingle xmlns='urn:xmpp:jingle:1'
  237. action='session-initiate'
  238. initiator='romeo@montague.lit/orchard'
  239. sid='851ba2'>
  240. <content creator='initiator' name='a-file-offer' senders='initiator'>
  241. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4'>
  242. <file>
  243. <date>1969-07-21T02:56:15Z</date>
  244. <desc>This is a test. If this were a real file...</desc>
  245. <media-type>text/plain</media-type>
  246. <name>test.txt</name>
  247. <range/>
  248. <size>6144</size>
  249. <hash xmlns='urn:xmpp:hashes:1' algo='sha-1'>552da749930852c69ae5d2141d3766b1</hash>
  250. </file>
  251. </description>
  252. <transport xmlns='urn:xmpp:jingle:transports:http:0'>
  253. <candidate uri='https://files.montague.example/test.txt' />
  254. </transport>
  255. </content>
  256. </jingle>
  257. </iq>]]></example>
  258. <p>Juliet accepts the offer, and then performs an HTTP GET to retrieve the file.</p>
  259. <example caption='Accepting an offered file using HTTP download'><![CDATA[
  260. <iq from='juliet@capulet.lit/balcony'
  261. id='nzu25s8'
  262. to='romeo@montague.lit/orchard'
  263. type='set'>
  264. <jingle xmlns='urn:xmpp:jingle:1'
  265. action='session-accept'
  266. initiator='romeo@montague.lit/orchard'
  267. sid='851ba2'>
  268. <content creator='initiator' name='a-file-offer' senders='initiator'>
  269. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4' />
  270. <transport xmlns='urn:xmpp:jingle:transports:http:0' />
  271. </content>
  272. </jingle>
  273. </iq>]]></example>
  274. </section2>
  275. <section2 topic='Requesting a File using HTTP Download'>
  276. <p>Here Romeo is requesting Juliet to send a file by sharing a download URI.</p>
  277. <example caption='Requesting a file and download URI'><![CDATA[
  278. <iq from='romeo@montague.lit/orchard'
  279. id='nzu25s8'
  280. to='juliet@capulet.lit/balcony'
  281. type='set'>
  282. <jingle xmlns='urn:xmpp:jingle:1'
  283. action='session-initiate'
  284. initiator='romeo@montague.lit/orchard'
  285. sid='851ba2'>
  286. <content creator='initiator' name='a-file-request' senders='responder'>
  287. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4'>
  288. <file>
  289. <hash xmlns='urn:xmpp:hashes:1' algo='sha-1'>552da749930852c69ae5d2141d3766b1</hash>
  290. </file>
  291. </description>
  292. <transport xmlns='urn:xmpp:jingle:transports:http:0' />
  293. </content>
  294. </jingle>
  295. </iq>]]></example>
  296. <p>Juliet accepts the request, and includes a download URI in her session-accept.</p>
  297. <example caption='Returning download URI'><![CDATA[
  298. <iq from='juliet@capulet.lit/balcony'
  299. id='nzu25s8'
  300. to='romeo@montague.lit/orchard'
  301. type='set'>
  302. <jingle xmlns='urn:xmpp:jingle:1'
  303. action='session-accept'
  304. sid='851ba2'>
  305. <content creator='initiator' name='a-file-request' senders='responder'>
  306. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4' />
  307. <file>
  308. <date>1969-07-21T02:56:15Z</date>
  309. <media-type>text/plain</media-type>
  310. <name>test.txt</name>
  311. <range/>
  312. <size>6144</size>
  313. <hash xmlns='urn:xmpp:hashes:1' algo='sha-1'>552da749930852c69ae5d2141d3766b1</hash>
  314. </file>
  315. </description>
  316. <transport xmlns='urn:xmpp:jingle:transports:http:0'>
  317. <candidate uri='https://files.capulet.example/test.txt' />
  318. </transport>
  319. </content>
  320. </jingle>
  321. </iq>]]></example>
  322. <p>Romeo then retrieves the file using an HTTP GET request.</p>
  323. </section2>
  324. <section2 topic='Offering a File using HTTP Upload'>
  325. <p>In this case, Romeo is offering a file to Juliet but wishes to upload it to her.</p>
  326. <example caption='Offering to upload a file'><![CDATA[
  327. <iq from='romeo@montague.lit/orchard'
  328. id='nzu25s8'
  329. to='juliet@capulet.lit/balcony'
  330. type='set'>
  331. <jingle xmlns='urn:xmpp:jingle:1'
  332. action='session-initiate'
  333. initiator='romeo@montague.lit/orchard'
  334. sid='851ba2'>
  335. <content creator='initiator' name='a-file-offer' senders='initiator'>
  336. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4'>
  337. <file>
  338. <date>1969-07-21T02:56:15Z</date>
  339. <desc>This is a test. If this were a real file...</desc>
  340. <media-type>text/plain</media-type>
  341. <name>test.txt</name>
  342. <range/>
  343. <size>6144</size>
  344. <hash xmlns='urn:xmpp:hashes:1' algo='sha-1'>552da749930852c69ae5d2141d3766b1</hash>
  345. </file>
  346. </description>
  347. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0' />
  348. </content>
  349. </jingle>
  350. </iq>]]></example>
  351. <p>Juliet accepts, and provides a candidate with an upload URI that includes an authorization header.</p>
  352. <example caption='Accepting the session and providing an upload URI'><![CDATA[
  353. <iq from='juliet@capulet.lit/balcony'
  354. id='nzu25s8'
  355. to='romeo@montague.lit/orchard'
  356. type='set'>
  357. <jingle xmlns='urn:xmpp:jingle:1'
  358. action='session-accept'
  359. sid='851ba2'>
  360. <content creator='initiator' name='a-file-request' senders='responder'>
  361. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4' />
  362. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  363. <candidate uri='https://files.capulet.example/ERIE32430'>
  364. <header name='authorization'>Bearer 7472327205ffb74d10b11363044d8c24e3ddba12</header>
  365. </candidate>
  366. </transport>
  367. </content>
  368. </jingle>
  369. </iq>]]></example>
  370. <p>Romeo now uses an HTTP PUT to upload his file. Once the upload is complete, he informs Juliet so she knows the file is ready for to read.</p>
  371. <example caption='Signaling that the upload has completed'><![CDATA[
  372. <iq from='romeo@montague.lit/orchard'
  373. id='uw72g176'
  374. to='juliet@capulet.lit/balcony'
  375. type='set'>
  376. <jingle xmlns='urn:xmpp:jingle:1'
  377. action='transport-info'
  378. sid='851ba2'>
  379. <content creator='initiator' name='file-upload'>
  380. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  381. <completed />
  382. </transport>
  383. </content>
  384. </jingle>
  385. </iq>]]></example>
  386. </section2>
  387. <section2 topic='Requesting a File using HTTP Upload'>
  388. <p>Here Romeo asks Juliet to upload a file.</p>
  389. <example caption='Offering a file with a download URI'><![CDATA[
  390. <iq from='romeo@montague.lit/orchard'
  391. id='nzu25s8'
  392. to='juliet@capulet.lit/balcony'
  393. type='set'>
  394. <jingle xmlns='urn:xmpp:jingle:1'
  395. action='session-initiate'
  396. initiator='romeo@montague.lit/orchard'
  397. sid='851ba2'>
  398. <content creator='initiator' name='a-file-offer' senders='initiator'>
  399. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4'>
  400. <file>
  401. <hash xmlns='urn:xmpp:hashes:1' algo='sha-1'>552da749930852c69ae5d2141d3766b1</hash>
  402. </file>
  403. </description>
  404. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  405. <candidate uri='https://files.montague.example/test.txt' />
  406. </transport>
  407. </content>
  408. </jingle>
  409. </iq>]]></example>
  410. <p>Juliet accepts the session, and begins uploading the file data with an HTTP PUT request.</p>
  411. <example caption='Accepting the session'><![CDATA[
  412. <iq from='juliet@capulet.lit/balcony'
  413. id='nzu25s8'
  414. to='romeo@montague.lit/orchard'
  415. type='set'>
  416. <jingle xmlns='urn:xmpp:jingle:1'
  417. action='session-accept'
  418. sid='851ba2'>
  419. <content creator='initiator' name='a-file-request' senders='responder'>
  420. <description xmlns='urn:xmpp:jingle:apps:file-transfer:4' />
  421. <file>
  422. <date>1969-07-21T02:56:15Z</date>
  423. <media-type>text/plain</media-type>
  424. <name>test.txt</name>
  425. <range/>
  426. <size>6144</size>
  427. <hash xmlns='urn:xmpp:hashes:1' algo='sha-1'>552da749930852c69ae5d2141d3766b1</hash>
  428. </file>
  429. </description>
  430. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  431. </content>
  432. </jingle>
  433. </iq>]]></example>
  434. <p>Once the upload is complete, she informs Romeo that she has completed the upload so that he knows he can access the data he requested.</p>
  435. <example caption='Signaling that the upload has completed'><![CDATA[
  436. <iq from='juliet@capulet.lit/balcony'
  437. id='uw72g176'
  438. to='romeo@montague.lit/orchard'
  439. type='set'>
  440. <jingle xmlns='urn:xmpp:jingle:1'
  441. action='transport-info'
  442. sid='851ba2'>
  443. <content creator='initiator' name='file-upload'>
  444. <transport xmlns='urn:xmpp:jingle:transports:http:upload:0'>
  445. <completed />
  446. </transport>
  447. </content>
  448. </jingle>
  449. </iq>]]></example>
  450. </section2>
  451. </section1>
  452. <section1 topic='Determining Support' anchor='support'>
  453. <p>To advertise its support for the Jingle HTTP Transport Method, when replying to &xep0030; information requests an entity MUST return URNs for any version of this protocol that the entity supports -- e.g., "urn:xmpp:jingle:transports:http:0" for this version &VNOTE;.</p>
  454. <example caption="Service discovery information request"><![CDATA[
  455. <iq from='romeo@montague.lit/orchard'
  456. id='uw72g176'
  457. to='juliet@capulet.lit/balcony'
  458. type='get'>
  459. <query xmlns='http://jabber.org/protocol/disco#info'/>
  460. </iq>]]></example>
  461. <example caption="Service discovery information response"><![CDATA[
  462. <iq from='juliet@capulet.lit/balcony'
  463. id='uw72g176'
  464. to='romeo@montague.lit/orchard'
  465. type='result'>
  466. <query xmlns='http://jabber.org/protocol/disco#info'>
  467. <feature var='urn:xmpp:jingle:1'/>
  468. <feature var='urn:xmpp:jingle:transports:http:0'/>
  469. <feature var='urn:xmpp:jingle:transports:http:upload:0'/>
  470. </query>
  471. </iq>]]></example>
  472. <p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
  473. </section1>
  474. <section1 topic='Security Considerations' anchor='security'>
  475. <p>HTTP URI candidates SHOULD use the "https://" URI scheme instead of "http://", and entities MAY refuse to process URIs that are not "https://".</p>
  476. <p>Certain HTTP headers can cause unintended behaviour, such as using the 'Upgrade' header to trigger a conversion to WebSocket (&rfc6455;).</p>
  477. </section1>
  478. <section1 topic='IANA Considerations' anchor='iana'>
  479. <p>No interaction with &IANA; is required as a result of this document.</p>
  480. </section1>
  481. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  482. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  483. <p>This specification defines the following XML namespaces:</p>
  484. <ul>
  485. <li>urn:xmpp:jingle:transports:http:0</li>
  486. <li>urn:xmpp:jingle:transports:http:upload:0</li>
  487. <li>urn:xmpp:jingle:transports:http:info:0</li>
  488. </ul>
  489. <p>The &REGISTRAR; includes the foregoing namespace in its registry of protocol namespaces at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  490. </section2>
  491. <section2 topic='Namespace Versioning' anchor='registrar-versioning'>
  492. &NSVER;
  493. </section2>
  494. <section2 topic='Jingle Transport Methods' anchor='registrar-content'>
  495. <p>The &REGISTRAR; includes "http-download" in its registry of Jingle transport methods at &JINGLETRANSPORTS;. The registry submission is as follows:</p>
  496. <code><![CDATA[
  497. <transport>
  498. <name>http-download</name>
  499. <desc>
  500. A method for negotiating data exchange via HTTP URI retrieval.
  501. </desc>
  502. <type>streaming</type>
  503. <doc>XEP-XXXX</doc>
  504. </transport>]]></code>
  505. <p>The &REGISTRAR; includes "http-upload" in its registry of Jingle transport methods at &JINGLETRANSPORTS;. The registry submission is as follows:</p>
  506. <code><![CDATA[
  507. <transport>
  508. <name>http-upload</name>
  509. <desc>
  510. A method for negotiating data exchange via uploading to HTTP URIs.
  511. </desc>
  512. <type>streaming</type>
  513. <doc>XEP-XXXX</doc>
  514. </transport>]]></code>
  515. </section2>
  516. </section1>
  517. <section1 topic='XML Schema' anchor='schema'>
  518. <section2 topic='urn:xmpp:jingle:transports:http:0'>
  519. <code><![CDATA[
  520. <?xml version='1.0' encoding='UTF-8'?>
  521. <xs:schema
  522. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  523. targetNamespace='urn:xmpp:jingle:transports:http:0'
  524. xmlns='urn:xmpp:jingle:transports:http:0'
  525. elementFormDefault='qualified'>
  526. <xs:element name='transport'>
  527. <xs:complexType>
  528. <xs:all minOccurs='0'>
  529. <xs:element name='candidate' type='httpSlotType' maxOccurs='unbounded' />
  530. </xs:all>
  531. </xs:complexType>
  532. </xs:element>
  533. <xs:complexType name='httpSlotType'>
  534. <xs:all minOccurs='0'>
  535. <xs:element ref='header' maxOccurs='unbounded' />
  536. </xs:all>
  537. <xs:attribute name='uri' type='xs:anyURI' use='required' />
  538. </xs:complexType>
  539. <xs:element name='header'>
  540. <xs:complexType>
  541. <xs:simpleContent>
  542. <xs:extension base='xs:string'>
  543. <xs:attribute name='name' use='required'/>
  544. </xs:extension>
  545. </xs:simpleContent>
  546. </xs:complexType>
  547. </xs:element>
  548. </xs:schema>]]></code>
  549. </section2>
  550. <section2 topic='urn:xmpp:jingle:transports:http:upload:0'>
  551. <code><![CDATA[
  552. <?xml version='1.0' encoding='UTF-8'?>
  553. <xs:schema
  554. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  555. targetNamespace='urn:xmpp:jingle:transports:http:upload:0'
  556. xmlns='urn:xmpp:jingle:transports:http:upload:0'
  557. elementFormDefault='qualified'>
  558. <xs:element name='transport'>
  559. <xs:complexType>
  560. <xs:all minOccurs='0'>
  561. <xs:element name='completed' maxOccurs='1' />
  562. <xs:element name='candidate' type='httpSlotType' maxOccurs='unbounded' />
  563. </xs:all>
  564. </xs:complexType>
  565. </xs:element>
  566. <xs:complexType name='httpSlotType'>
  567. <xs:all minOccurs='0'>
  568. <xs:element ref='header' maxOccurs='unbounded' />
  569. </xs:all>
  570. <xs:attribute name='uri' type='xs:anyURI' use='required' />
  571. </xs:complexType>
  572. <xs:element name='header'>
  573. <xs:complexType>
  574. <xs:simpleContent>
  575. <xs:extension base='xs:string'>
  576. <xs:attribute name='name' use='required'/>
  577. </xs:extension>
  578. </xs:simpleContent>
  579. </xs:complexType>
  580. </xs:element>
  581. </xs:schema>]]></code>
  582. </section2>
  583. </section1>
  584. </xep>