mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-21 23:28:51 -05:00
1.16 RC4 fixed one more potentially right scrolling example
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@583 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
9f6c2f78b4
commit
69f85683dc
20
xep-0124.xml
20
xep-0124.xml
@ -890,6 +890,7 @@ Content-Length: 68
|
||||
<p>The cross domain security restrictions of some runtime environments permit clients to access pure XML text only if it was received from a specific server (e.g., the hostname a Web client was downloaded from). Astonishingly the same environments typically permit clients to receive and execute scripts from any server! <note>This security hole is unlikely to be closed by browser vendors since it facilitates online advertising.</note> The <link url="#security">Security Considerations</link> section below describes the significant risks of deploying Script Syntax.</p>
|
||||
<p>To enable domain-restricted clients to use BOSH with any connection manager, this section proposes an <em>optional</em> alternative to the standard "BOSH Pure Syntax" seen in the other sections of this document. The "BOSH Script Syntax" defined here essentially inserts each <body/> element sent by the client into an HTTP GET header instead of into the body of a POST request. Each <body/> element sent by the connection manager is wrapped inside an &ECMAScript; string and function call. No changes to the <body/> element or to any other aspects of the protocol are required.</p>
|
||||
<p>If, and only if, a client is <em>unable</em> to use the Pure Syntax, then it MAY send a session request to a BOSH connection manager using Script Syntax instead. If the connection manager supports Script Syntax then it MUST send its <link url="#session-create">Session Creation Response</link> using Script Syntax, and all subsequent client requests and connection manager responses within the session MUST be sent using Script Syntax. If the connection manager does not support the "BOSH Script" syntax then it SHOULD return either an 'item-not-found' terminal binding error (in Script Syntax) or an HTTP 404 (Not Found) error in response to the client's session request:</p>
|
||||
<p>Note: The line break in the body of the HTTP response in the following example is included only to improve readability. In practice there MUST be no line breaks.</p>
|
||||
<example caption="Script Syntax not supported binding error">
|
||||
<![CDATA[HTTP/1.1 200 OK
|
||||
Content-Type: text/javascript; charset=utf-8
|
||||
@ -898,7 +899,8 @@ Cache-Control: no-cache
|
||||
Pragma: no-cache
|
||||
Content-Length: 212
|
||||
|
||||
_BOSH_("<body type='terminate' condition='item-not-found' xmlns='http://jabber.org/protocol/httpbind'/>")]]></example>
|
||||
_BOSH_("<body type='terminate' condition='item-not-found'
|
||||
xmlns='http://jabber.org/protocol/httpbind'/>")]]></example>
|
||||
<example caption="Script Syntax not supported HTTP error">
|
||||
<![CDATA[HTTP/1.1 404 Not Found
|
||||
Content-Length: 0]]></example>
|
||||
@ -911,13 +913,13 @@ Content-Length: 0]]></example>
|
||||
<li><p>The resulting URI MUST be sent to the connection manager within an HTTP GET request.</p></li>
|
||||
<li><p>Include extra HTTP headers to prevent request/response caching or storage by any intermediary.</p></li>
|
||||
</ol>
|
||||
<p>Note: Line breaks in the HTTP requests shown in the following examples are not significant and are included only to improve readability.</p>
|
||||
<p>Note: All whitespace between "GET " and " HTTP/1.1" in the HTTP GET header lines in the following two examples is included only to improve readability. In practice there MUST be no whitespace.</p>
|
||||
<example caption="Requesting an HTTP session in Script Syntax"><![CDATA[
|
||||
GET /webclient?%3Cbody%20content='text/xml;%20charset=utf-8'%20
|
||||
hold='1'%20rid='1573741820'%20to='jabber.org'%20
|
||||
route='xmpp:jabber.org:9999'%20secure='true'%20ver='1.6'%20
|
||||
wait='60'%20xml:lang='en'%20
|
||||
xmlns='http://jabber.org/protocol/httpbind'/%3E
|
||||
xmlns='http://jabber.org/protocol/httpbind'/%3E
|
||||
HTTP/1.1
|
||||
Host: httpcm.jabber.org
|
||||
Accept-Encoding: gzip, deflate
|
||||
@ -929,7 +931,7 @@ Content-Length: 0]]></example>
|
||||
GET /webclient?%3Cbody%20rid='1249243562'%20sid='SomeSID'%20
|
||||
xmlns='http://jabber.org/protocol/httpbind'%3E%3C
|
||||
message%20to='friend@example.com'%20xmlns='jabber:client'%3E%3C
|
||||
body%3EI%20said%20%22Hi!%22%3C/body%3E%3C/message%3E%3C/body%3E
|
||||
body%3EI%20said%20%22Hi!%22%3C/body%3E%3C/message%3E%3C/body%3E
|
||||
HTTP/1.1
|
||||
Host: httpcm.jabber.org
|
||||
Accept-Encoding: gzip, deflate
|
||||
@ -958,7 +960,7 @@ Content-Length: 0]]></example>
|
||||
<li><p>If the client request does not possess a 'content' attribute, then the HTTP Content-Type header of responses MUST be either "text/javascript; charset=utf-8" or "application/x-javascript; charset=utf-8".</p></li>
|
||||
<li><p>Include extra HTTP headers to prevent caching or storage by any intermediary.</p></li>
|
||||
</ol>
|
||||
<p>Note: Line breaks in the _BOSH_ code shown in the following examples are not significant and are included only to improve readability.</p>
|
||||
<p>Note: All line breaks in the bodies of the HTTP responses in the following two examples is included only to improve readability. In practice there MUST be no line breaks.</p>
|
||||
<example caption="Session creation response in Script Syntax">
|
||||
<![CDATA[HTTP/1.1 200 OK
|
||||
Content-Type: text/javascript; charset=utf-8
|
||||
@ -967,9 +969,9 @@ Cache-Control: no-cache
|
||||
Pragma: no-cache
|
||||
Content-Length: 233
|
||||
|
||||
_BOSH_("<body wait='60' inactivity='30' polling='5' requests='2' hold='1'
|
||||
accept='deflate,gzip' maxpause='120' sid='SomeSID'
|
||||
charsets='ISO_8859-1 ISO-2022-JP' ver='1.6' from='jabber.org'
|
||||
_BOSH_("<body wait='60' inactivity='30' polling='5' requests='2' hold='1'
|
||||
accept='deflate,gzip' maxpause='120' sid='SomeSID'
|
||||
charsets='ISO_8859-1 ISO-2022-JP' ver='1.6' from='jabber.org'
|
||||
secure='true' xmlns='http://jabber.org/protocol/httpbind'/>")
|
||||
]]></example>
|
||||
<example caption="Receiving stanzas in Script Syntax">
|
||||
@ -980,7 +982,7 @@ Cache-Control: no-cache
|
||||
Pragma: no-cache
|
||||
Content-Length: 212
|
||||
|
||||
_BOSH_("<body rid='1249243562' sid='SomeSID'
|
||||
_BOSH_("<body rid='1249243562' sid='SomeSID'
|
||||
xmlns='http://jabber.org/protocol/httpbind'>\n
|
||||
<message to='contact@example.com' xmlns='jabber:client'>\n
|
||||
<body>I said \"Hi!\"</body>\n</message>\n</body>")
|
||||
|
Loading…
Reference in New Issue
Block a user