A Python UPnP Media Server
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.

928 lines
35 KiB

  1. UPnP Forum Technical Committee Yaron Y. Goland
  2. Document: draft-goland-http-udp-04.txt CrossGain
  3. Jeffrey C. Schlimmer
  4. Microsoft
  5. 02 October 2000
  6. Multicast and Unicast UDP HTTP Messages
  7. Status of this Memo
  8. This document is under review by the UPnP Forum Technical Committee.
  9. It was previously submitted to the IETF as an Internet Draft and has
  10. expired. This document is formatted in a manner consistent with the
  11. IETF formatting guidelines to facilitate possible future
  12. consideration by the IETF.
  13. This document is available on http://www.upnp.org.
  14. Abstract
  15. This document provides rules for encapsulating HTTP messages in
  16. multicast and unicast UDP packets to be sent within a single
  17. administrative scope. No provisions are made for guaranteeing
  18. delivery beyond re-broadcasting.
  19. 1. Introduction
  20. This document provides rules for encapsulating HTTP messages in
  21. multicast and unicast UDP messages. No provisions are made for
  22. guaranteeing delivery beyond re-broadcasting.
  23. This technology is motivated by applications such as SSDP where it
  24. is expected that messages which are primarily transmitted over TCP
  25. HTTP need to be transmitted over Multicast or Unicast UDP, because
  26. of the unique requirements of extremely lightweight servers.
  27. This document will not specify a mechanism suitable for replacing
  28. HTTP over TCP. Rather this document will define a limited mechanism
  29. only suitable for extreme circumstances where the use of TCP is
  30. impossible. Thus this mechanism will not have the robustness of
  31. functionality and congestion control provided by TCP. It is expected
  32. that in practice the mechanisms specified here in will only be used
  33. as a means to get to TCP based HTTP communications.
  34. 2. Changes
  35. 2.1. Since 00
  36. Divided each section of the spec into three parts, problem
  37. definition, proposed solution and design rationale. When the spec is
  38. ready for standardization the problem definition and design
  39. rationale sections will be removed. Design rationale is presented in
  40. Goland, Schlimmer 1
  41. UPnP Forum UDP HTTP 24 Aug 2000
  42. question/answer form because I have found that to be very effective
  43. in addressing design issues.
  44. Clarified that a HTTPU/HTTPMU URI without an abs_path translates to
  45. "*" in the request-URI.
  46. Added the S header to allow request and responses to be associated.
  47. Note that while clients aren't required to send out S headers,
  48. servers are required to return them.
  49. Got rid of MM. The lower bound is always 0.
  50. The introduction of the S header makes proxying and caching possible
  51. so the sections on those topics have been expanded, but they should
  52. be considered experimental at best.
  53. 2.2. Since 02
  54. Added requirement for HTTP/1.1 as the version identifier in the
  55. request line. (See section on HTTP Version in Request Line.)
  56. Removed requirement that requests without an S header MUST NOT be
  57. responded to. (See section on Unicast UDP HTTP Messages.)
  58. Clarified that a server should respond to each request it receives
  59. but not duplicate those responses. (See section on Retrying
  60. Requests.)
  61. Clarified caching when responding to repeated requests. (See section
  62. on Caching.)
  63. Expanded that if a server has > 1 response per HTTPMU request, it
  64. should spread them out. (See section on MX header.)
  65. Tied behavior of duplicate responses with the same S header value to
  66. the semantics of the method (was discard duplicates). (See section
  67. on S header.)
  68. Outlined initial security considerations. (See section on Security.)
  69. 2.3. Since 03
  70. Clarified the "no abs_path" requirement for HTTPU/HTTPMU request-
  71. URIs.
  72. Clarified use of "*" as a request-URI.
  73. Removed requirement for HTTPU/HTTPMU servers to support "chunked"
  74. transfer-coding.
  75. 3. Terminology
  76. Since this document describes a set of extensions to the HTTP/1.1
  77. protocol, the augmented BNF used herein to describe protocol
  78. Goland, Schlimmer 2
  79. UPnP Forum UDP HTTP 24 Aug 2000
  80. elements is exactly the same as described in section 2.1 of
  81. [RFC2616]. Since this augmented BNF uses the basic production rules
  82. provided in section 2.2 of [RFC2616], these rules apply to this
  83. document as well.
  84. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  85. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  86. document are to be interpreted as described in RFC 2119 [RFC2119].
  87. 4. HTTPU URL
  88. 4.1. Problem Definition
  89. A mechanism is needed to allow for communications that are to be
  90. sent over Unicast UDP HTTP to be identified in the URI namespace.
  91. 4.2. Proposed Solution
  92. The HTTPU URL specifies that the HTTP request be sent over unicast
  93. UDP according to the rules laid out in this document.
  94. HTTPU_URL = "HTTPU:" "//" host [ ":" port ] [ abs path [ "?" query]]
  95. The BNF productions host, port and abs path are defined in
  96. [RFC2616].
  97. The syntax of the HTTPU URL is to be processed identically to the
  98. HTTP URL with the exception of the transport.
  99. One MUST NOT assume that if a HTTP, HTTPU or HTTPMU URL are
  100. identical in all ways save the protocol that they necessarily point
  101. to the same resource.
  102. 4.3. Design Rationale
  103. 4.3.1. Why would we ever need a HTTPU/HTTPMU URL?
  104. Imagine one wants to tell a system to send responses over HTTPU. How
  105. would one express this? If one uses a HTTP URL there is no way for
  106. the system to understand that you really meant HTTPU.
  107. 5. HTTPMU URL
  108. 5.1. Problem Definition
  109. A mechanism is needed to allow for communications that are to be
  110. sent over Multicast UDP HTTP to be identified in the URI namespace.
  111. 5.2. Proposed Solution
  112. The HTTPMU URL specifies that the HTTP request that HTTP request is
  113. to be sent over multicast UDP according to the rules laid out in
  114. this document.
  115. Goland, Schlimmer 3
  116. UPnP Forum UDP HTTP 24 Aug 2000
  117. HTTPMU_URL = "HTTPMU:" "//" host [ ":" port ] [ abs path [ "?"
  118. query]]
  119. The BNF productions host, port and abs path are defined in
  120. [RFC2616].
  121. The syntax of the HTTPMU URL is to be processed identically to the
  122. HTTP URL with the exception of the transport.
  123. One MUST NOT assume that if a HTTP, HTTPU or HTTPMU URL are
  124. identical in all ways save the protocol that they necessarily point
  125. to the same resource.
  126. If a HTTPMU URL does not have an abs path element then when the HTTP
  127. multicast UDP request is made the request-URI MUST be "*".
  128. For example, HTTPU://www.foo.com would translate into a request-URI
  129. of "*". A request-URI of HTTPU://www.foo.com/ would still translate
  130. to the absoluteURI "HTTPU://www.foo.com/".
  131. 5.3. Design Rationale
  132. 5.3.1. In the HTTPMU URL a request such as http://www.foo.com is
  133. translated to a "*" in the request-URI rather than a "/", why
  134. isn't the same the case for HTTPU?
  135. A HTTPU request is a point-to-point request. There is one sender and
  136. one receiver. Thus the semantics of the URL are identical to HTTP
  137. with the exception of the transport.
  138. Generally, a HTTPMU client will want to send its request to many
  139. receivers at once, where each receiver represents a different set of
  140. resources. A client can specify this in the HTTPMU request itself by
  141. using the request-URI "*". Unfortunately, there is no present way to
  142. construct an HTTP URL that will have this request-URI. As such, a
  143. mechanism had to be added.
  144. 5.3.2. Why would an HTTPMU client want to use a request-URI of "*"
  145. anyway?
  146. In TCP HTTP, the client will often specify a single resource on
  147. which the request should operate. For example, a GET of the URL
  148. http://foo.org/baz.gif should retrieve the resource at that single,
  149. well-defined location.
  150. One big reason for a client to send a request over multicast UDP,
  151. though, is the ability to send a request to many receivers at once,
  152. even when the number of receivers is not known.
  153. Specifying an absoluteURI in the request, though, would defeat this;
  154. all receivers without that exact resource would be forced to reject
  155. the request.
  156. Goland, Schlimmer 4
  157. UPnP Forum UDP HTTP 24 Aug 2000
  158. By specifying a request-URI of "*" client signifies that the request
  159. "does not apply to a particular resource, but to the server itself,
  160. and is only allowed when the method used does not necessarily apply
  161. to a resource." [RFC 2616]
  162. 5.3.3. So when would an HTTPMU client want to use a request-URI other
  163. than "*"?
  164. This may be useful when a client knows the URI for the resource, but
  165. not the server on which the resource lives. If the client knows
  166. both, though, it is expected that TCP HTTP or HTTPU would be used.
  167. Servers MUST NOT assume that an HTTPMU request containing an
  168. absoluteURI necessarily refers to the same resource as a HTTPU
  169. request with the same absoluteURI. For example, servers that support
  170. both HTTPMU and HTTPU may reject a request for a particular resource
  171. when received through HTTPMU, but accept it when received through
  172. HTTPU.
  173. 6. HTTP Version in Request Line
  174. 6.1. Problem Definition
  175. A message format identifier is needed for the HTTPU and HTTPMU
  176. request lines.
  177. 6.2. Proposed Solution
  178. Request lines for HTTPU and HTTPMU requests MUST use HTTP/1.1 as the
  179. version.
  180. Request-Line = Method SP Request-URI SP HTTP/1.1 CRLF
  181. The BNF production Method is defined in [RFC2616].
  182. 6.3. Design Rationale
  183. 6.3.1. Why not define separate HTTPU and HTTPMU versions?
  184. While HTTP/1.1 does hint at underlying features (like pipelining),
  185. it principally specifies a message format. HTTPU and HTTPMU use the
  186. same message format as defined by HTTP/1.1. Reusing this message
  187. format identifier enables syntactic parsing / generating of HTTPU
  188. and HTTPMU request by existing HTTP message mungers.
  189. 6.3.2. If the version in the request line is the same as an HTTP
  190. request, once a request was stored, how could one distinguish an
  191. HTTPU (or HTTPMU) request from an HTTP request?
  192. TBD
  193. 7. Unicast UDP HTTP Messages
  194. Goland, Schlimmer 5
  195. UPnP Forum UDP HTTP 24 Aug 2000
  196. 7.1. Problem Definition
  197. A mechanism is needed to send HTTP messages over the unicast UDP
  198. transport.
  199. 7.2. Proposed Solution
  200. HTTP messages sent over unicast UDP function identically to HTTP
  201. messages sent over TCP as defined in [RFC2616] except as specified
  202. below.
  203. For brevity's sake HTTP messages sent over unicast UDP will be
  204. referred to as HTTPU messages.
  205. HTTPU messages MUST fit entirely in a single UDP message. If a HTTPU
  206. message can not be fit into a single UDP message then it MUST NOT be
  207. sent using unicast UDP. Incomplete HTTPU messages SHOULD be ignored.
  208. The request-URI of a HTTPU message MUST always be fully qualified.
  209. A single unicast UDP message MUST only contain a single HTTPU
  210. message. As such, an HTTPU server MAY reject messages with "chunked"
  211. transfer-coding.
  212. When responding to a HTTPU request with an S header the rules for
  213. the proper handling of S headers, as specified below MUST be
  214. followed.
  215. 7.3. Design Rationale
  216. See also the subsection on the S header below for the design
  217. rationale of the S header.
  218. 7.3.1. Why can't a single HTTP message be sent over multiple UDP
  219. messages?
  220. The ability to send unlimited size messages across the Internet is
  221. one of the key features of TCP. The goal of this paper is not to
  222. reinvent TCP but rather to provide a very simple emergency back up
  223. HTTP system that can leverage UDP where TCP cannot be used. As such
  224. features to allow a single HTTP message to span multiple UDP
  225. messages is not provided.
  226. 7.3.2. Why are request-URIs sent over HTTPU required to be fully
  227. qualified?
  228. A relative URI in a HTTP message is assumed to be relative to a HTTP
  229. URL. However this would clearly be inappropriate for a HTTPU or
  230. HTTPMU message. The easiest solution would be to simply state that a
  231. relative URI is relative to the type of message it was sent in. But
  232. one of the goals of this draft is to allow current HTTP message
  233. processors to be able to munch on HTTPU/HTTPMU messages and this
  234. would cause a change to those processors.
  235. Goland, Schlimmer 6
  236. UPnP Forum UDP HTTP 24 Aug 2000
  237. The cost of this simplification is that you repeat the host
  238. information, once in the URI and once in the host header.
  239. But again, taking out the host header would make a lot of existing
  240. HTTP message munchers very unhappy.
  241. 7.3.3. Why is the requirement for ignoring incomplete HTTPU messages a
  242. SHOULD instead of a MUST?
  243. Some systems use a lot of redundant data or have good mechanisms for
  244. handling partial data. As such they could actually do something
  245. intelligent with a partial message. A SHOULD allows them to do this
  246. while still making it clear that in the majority case partial
  247. HTTPU/HTTPMU messages are going to get thrown out.
  248. 7.3.4. Why aren't multiple HTTP messages allowed into a single UDP
  249. message if they will fit?
  250. It was easier to ban it, and it didn't seem to buy us much. It was
  251. especially worrying because it would start to convince people that
  252. they could actually order their UDP requests in a pipelinesque
  253. manner. It was easier to just keep things simple and ban it.
  254. 7.3.5. Why aren't we allowed to leave off content-lengths if only a
  255. single HTTPU message is allowed in a UDP message?
  256. In general we try to only change from RFC 2616 when we are forced
  257. to. Although including a content-length is annoying it makes it easy
  258. to use HTTP/1.1 message parsing/generating systems with this spec.
  259. 7.3.6. Why might a HTTPU message choose to not have an S header?
  260. Leaving off the S header would be useful for throwaway events. In
  261. systems with a high event rate it is usually easier to just throw
  262. away an event rather than re-sending it. As such there is no real
  263. benefit to correlating unnecessary responses with requests.
  264. 7.3.7. Why isn't the MX header used on HTTPU messages?
  265. As HTTPU messages are point-to-point there will be exactly one
  266. response. MX is only useful in cases, such as HTTPMU requests, where
  267. there can be many potential responses from numerous different
  268. clients. MX helps to prevent the client from getting creamed with
  269. responses.
  270. 7.3.8. Can I send 1xx responses over HTTPU?
  271. Yes. Error handling is identical to RFC 2616.
  272. 8. Multicast UDP HTTP Requests
  273. 8.1. Problem Definition
  274. Goland, Schlimmer 7
  275. UPnP Forum UDP HTTP 24 Aug 2000
  276. A mechanism is needed to send HTTP messages over the multicast UDP
  277. transport.
  278. 8.2. Proposed Solution
  279. HTTP messages sent over multicast UDP MUST obey all the requirements
  280. for HTTPU messages in addition to the requirements provided below.
  281. For brevity's sake HTTP messages sent over multicast UDP will be
  282. referred to as HTTPMU messages.
  283. Resources that support receiving multicast UDP HTTP requests MUST
  284. honor the MX header if included in the request.
  285. If a resource has a single response, it MUST generate a random
  286. number between 0 and MX that represents the number of seconds the
  287. resource MUST wait before sending a response. If a resource has
  288. multiple responses per request, it SHOULD send these resources
  289. spread over the interval [0..MX]. This prevents all responses from
  290. being sent at once.
  291. HTTP clients SHOULD keep listening for responses for a reasonable
  292. delta of time after MX. That delta will be based on the type of
  293. network the request is being sent over. This means that if a server
  294. cannot respond to a request before MX then there is little point in
  295. sending the response, as the client will most likely not be
  296. listening for it.
  297. When used with a multicast UDP HTTP request, the "*" request-URI
  298. means "to everyone who is listening to this IP address and port."
  299. A HTTPMU request without a MX header MUST NOT be responded to.
  300. 8.3. Design Rationale
  301. 8.3.1. Why is there a "delta" after the MX time when the client should
  302. still be listening?
  303. So let's say the MX value is 5 seconds. The HTTP resource generates
  304. a number between 0 and 5 and gets 5. After 5 seconds of waiting the
  305. HTTP resource will send its response.
  306. Now for some math:
  307. 0.5 seconds - Time it took the client's request to reach
  308. the HTTP resource.
  309. 5 seconds - Time the HTTP resource waited after
  310. receiving the message to respond, based on
  311. the MX value.
  312. 0.5 seconds - Time for the response to get back to the
  313. client.
  314. Total time elapsed - 6 seconds
  315. Goland, Schlimmer 8
  316. UPnP Forum UDP HTTP 24 Aug 2000
  317. If the client only waits 5 seconds, the MX value, then they would
  318. have stopped listening for this response by the time it arrived,
  319. hence the need for the delta.
  320. 8.3.2. What should the "delta" after MX expires be?
  321. Unfortunately this is an impossible question to answer. How fast is
  322. your network? How far is the message going? Is there any congestion?
  323. In general delta values will be set based on a combination of
  324. heuristics and application necessity. That is, if you are displaying
  325. information to a user any data that comes in after 20 or 30 seconds
  326. is probably too late.
  327. 8.3.3. When would a HTTPMU request not be responded to?
  328. When a HTTP resource is making a general announcement, such as "I am
  329. here", it generally isn't useful to have everyone respond confirming
  330. they received the message. This is especially the case given that
  331. the HTTP resource probably doesn't know who should have received the
  332. announcement so the absence of a HTTP client in the responses
  333. wouldn't be meaningful.
  334. Whether a particular request requires a response is dependant on the
  335. application, and is beyond the scope of this specification.
  336. 8.3.4. Why do we require the MX header on HTTPMU requests that are to
  337. be responded to?
  338. This is to prevent overloading the HTTP client. If all the HTTP
  339. resources responded simultaneously the client would probably loose
  340. most of the responses as its UDP buffer overflowed.
  341. 9. Retrying Requests
  342. 9.1. Problem Definition
  343. UDP is an unreliable transport with no failure indicators; as such
  344. some mechanism is needed to reasonably increase the chance that a
  345. HTTPU/HTTPMU message will be delivered.
  346. 9.2. Proposed Solution
  347. UDP is an inherently unreliable transport and subject to routers
  348. dropping packets without notice. Applications requiring delivery
  349. guarantees SHOULD NOT use HTTPU or HTTPMU.
  350. In order to increase the probability that a HTTPU or HTTPMU message
  351. is delivered the message MAY be repeated several times. If a
  352. multicast resource would send a response(s) to any copy of the
  353. request, it SHOULD send its response(s) to each copy of the request
  354. it receives. It MUST NOT repeat its response(s) per copy of the
  355. reuqest.
  356. Goland, Schlimmer 9
  357. UPnP Forum UDP HTTP 24 Aug 2000
  358. In order to prevent the network from being flooded a message SHOULD
  359. NOT be repeated more than MAX_RETRIES time. A random period of time
  360. between 0 and MAX_RETRY_INTERVAL SHOULD be selected between each
  361. retry to determine how long to wait before issuing the retry.
  362. 9.3. Design Rationale
  363. 9.3.1. Why is the requirement "applications requiring delivery
  364. guarantees should not use HTTPU or HTTPMU" only a SHOULD and not
  365. a MUST?
  366. Because there might come a day when it makes sense to use HTTPU or
  367. HTTPMU for guaranteed delivery and there is no reason to completely
  368. ban the possibility.
  369. 9.3.2. Why is the requirement that a request not be repeated more than
  370. MAX_RETRIES times a SHOULD and not a MUST?
  371. Local knowledge may make the limit unnecessary. For example, if one
  372. knew that the message was being delivered using a super reliable
  373. network then repeats are not necessary. Similarly if one knew that
  374. the network the requests were going through were particularly
  375. unreliable and assuming one had properly accounted for the effects
  376. of additional messages on that congestion, one might have a good
  377. reason to send more than MAX_RETRIES.
  378. 9.3.3. Why SHOULD multicast resources respond to each copy of a request
  379. it receives?
  380. Because the earlier responses might have been lost.
  381. 9.3.4. Why MUST multicast resources not repeat its response(s) to each
  382. copy of a request it receives?
  383. This strategy provides the lowest network loading for any desired
  384. level of reliability, or equivalently, the highest reliability for
  385. any specified level of network loading.
  386. 10. Caching
  387. 10.1. Problem Definition
  388. Caching is a feature that has demonstrated its usefulness in HTTP,
  389. provisions need to be made to ensure that HTTPU/HTTPMU messages can
  390. be cached using a consistent algorithm.
  391. 10.2. Proposed Solution
  392. [Ed. Note: Never having tried to actually build a HTTPU/HTTPMU
  393. generic cache we suspect there are some very serious gotchas here
  394. that we just haven't found yet. This section should definitely be
  395. treated as "under development."]
  396. Goland, Schlimmer 10
  397. UPnP Forum UDP HTTP 24 Aug 2000
  398. Caching rules for HTTPU/HTTPMU responses are no different than
  399. normal HTTP responses. HTTPU/HTTPMU responses are matched to their
  400. requests through the S header value.
  401. When responding to a multicast request, a resource MAY cache its
  402. response(s) and retransmit from the cache in response to duplicate
  403. requests.
  404. 10.3. Design Rationale
  405. 10.3.1. Wouldn't it be useful to be able to cache HTTPU/HTTPMU requests
  406. if they don't have responses?
  407. Yes, it probably would, especially if we are talking about a client-
  408. side cache. It is probably worth investigating the use of cache
  409. control headers on requests for this very purpose.
  410. 11. Proxying UDP HTTP Requests
  411. 11.1. Problem Definition
  412. For security or caching reasons it is sometimes necessary to place a
  413. proxy in a message path. Provisions need to be made to ensure that
  414. HTTPU/HTTPMU messages can be proxied.
  415. 11.2. Proposed Solution
  416. [Ed. Note: This section should be considered experimental. No one
  417. has really had to design much less implement a HTTPU/HTTPMU proxy
  418. yet.]
  419. All transport independent rules for proxying, such as length of time
  420. to cache a response, hop-by-hop header rules, etc. are the same for
  421. HTTPU/HTTPMU as they are for HTTP messages.
  422. [Ed. Note: I'm not sure how far to go into the "transport
  423. independent rules". The RFC 2616 doesn't really call them out very
  424. well but I also don't want to have to re-write RFC 2616 spec inside
  425. this spec.]
  426. The transport dependent rules, however, are different. For example,
  427. using TCP any pipelined messages are guaranteed to be delivered in
  428. order. There are no ordering guarantees of any form for HTTPU/HTTPMU
  429. proxies.
  430. In general a proxy is required to forward a HTTPU/HTTPMU message
  431. exactly once. It SHOULD NOT repeat the message. Rather the client is
  432. expected to repeat the message and, as the proxy receives the
  433. repeats, they will be forwarded.
  434. Note that it is acceptable, if not encouraged, for proxies to
  435. analyze network conditions and determine the likelihood, on both
  436. incoming and outgoing connections, of UDP messages being dropped. If
  437. Goland, Schlimmer 11
  438. UPnP Forum UDP HTTP 24 Aug 2000
  439. the likelihood is too high then it would be expected for the proxy,
  440. taking into consideration the possibility of making congestion even
  441. worse, to repeat requests and responses on its own. In a sense the
  442. proxy could be thought of as a signal regenerator. This is why the
  443. prohibition against repeating messages is a SHOULD NOT rather than a
  444. MUST NOT.
  445. HTTPMU messages are sent with the assumption that the message will
  446. only be seen by the multicast address they were sent to. Thus when a
  447. proxy forwards the request it is expected to only do so to the
  448. appropriate multicast channel. Note, however, that proxies may act
  449. as multicast bridges.
  450. Also note that proxied HTTPMU messages with a HTTPMU URL without an
  451. absolute path are to be treated as if they were sent to the
  452. specified multicast address with the request-URI "*".
  453. If a HTTPMU request is sent with a host that does not resolve to a
  454. multicast address then the request MUST be rejected with a 400 Bad
  455. Request error.
  456. There is no requirement that a HTTPU proxy support HTTPMU or vice
  457. versa.
  458. 11.3. Design Rationale
  459. 11.3.1. Why would anyone proxy HTTPMU requests?
  460. Proxying HTTPMU requests can be a neat way to create virtual
  461. multicast channels. Just hook a bunch of proxies together with
  462. unicast connections and tell the proxies' users that they are all on
  463. the same multicast scope.
  464. 12. HTTP Headers
  465. 12.1. AL (Alternate Location) General Header
  466. 12.1.1. Problem Definition
  467. There are many instances in which a system needs to provide location
  468. information using multiple URIs. The LOCATION header only allows a
  469. single URI. Therefore a mechanism is needed to allow multiple
  470. location URIs to be returned.
  471. 12.1.2. Proposed Solution
  472. AL = "AL" ":" 1*("<" AbsoluteURI ">") ; AbsoluteURI is defined in
  473. section 3.2.1 of [RFC2616]
  474. The AL header is an extension of the LOCATION header whose semantics
  475. are the same as the LOCATION header. That is, the AL header allows
  476. one to return multiple locations where as the LOCATION header allows
  477. one to return only one. The contents of an AL header are ordered. If
  478. Goland, Schlimmer 12
  479. UPnP Forum UDP HTTP 24 Aug 2000
  480. both a LOCATION header and an AL header are included in the same
  481. message then the URI in the LOCATION header is to be treated as if
  482. it were the first entry in the AL header. The AL header MAY be used
  483. by itself but implementers should be aware that existing systems
  484. will ignore the header.
  485. 12.1.3. Design Rationale
  486. 12.1.3.1. Why not just fix the BNF for the LOCATION header?
  487. This is tempting but the goal of maintaining compatibility with RFC
  488. 2616's message format overrides the usefulness of this solution.
  489. 12.2. MX Request Header
  490. 12.2.1. Problem Definition
  491. A mechanism is needed to ensure that responses to HTTPMU requests do
  492. not come at a rate greater than the requestor can handle.
  493. 12.2.2. Proposed Solution
  494. MX = "MX" ":" Integer
  495. Integer = First_digit *More_digits
  496. First_digit = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
  497. More_digits = "0" | First_digit
  498. The value of the MX header indicates the maximum number of seconds
  499. that a multicast UDP HTTP resource MUST wait before it sends a
  500. response stimulated by a multicast request.
  501. HTTP resources MAY treat any MX header value greater than MX_MAX as
  502. being equal to MX_MAX.
  503. 12.2.3. Design Rationale
  504. 12.2.3.1. Why is MX in seconds?
  505. In practice wait periods shorter than a second proved useless and
  506. longer proved too coarse. Of course as faster networks get deployed
  507. finer-grain times would be useful, but we need a compromise
  508. measurement that will meet everyone's needs. Seconds seem to do that
  509. quite well.
  510. 12.2.3.2. Couldn't MX still overload the requestor if there are too
  511. many responders?
  512. Absolutely. If there are a 100,000 clients that want to respond even
  513. pushing them over 30 seconds on a 10 Mbps link is still going to
  514. blow both the client and the network away. However the only way to
  515. prevent these sorts of situations is to know the current available
  516. network bandwidth and the total number of likely responders ahead of
  517. Goland, Schlimmer 13
  518. UPnP Forum UDP HTTP 24 Aug 2000
  519. time. Both generally prove between difficult to impossible to figure
  520. out. So we are left with heuristics and the MX header.
  521. 12.3. S (Sequence) General Header
  522. 12.3.1. Problem Definition
  523. A mechanism is needed to associate HTTPU/HTTPMU requests with
  524. responses, as UDP does not have any connection semantics.
  525. 12.3.2. Proposed Solution
  526. S = "S" ":" AbsoluteURI
  527. The S header is a URI that is unique across the entire URI namespace
  528. for all time. When an S header is sent on a HTTPU/HTTPMU request it
  529. MUST be returned, with the same value, on the response.
  530. If a client receives multiple responses with the same S header then
  531. the client MAY assume that all the responses are in response to the
  532. same request. If the messages differ from each other then the client
  533. MUST behave based on the specification of the request method.
  534. 12.3.3. Design Rationale
  535. 12.3.3.1. Why do we need the S header?
  536. Without an S header the only way to match requests with responses is
  537. to ensure that there is enough information in the response to know
  538. what request it was intended to answer. Even in that case it is
  539. still possible to confuse which request a response goes to if it
  540. does not have the equivalent of an S header.
  541. 12.3.3.2. Why aren't S headers mandatory on all requests with a
  542. response?
  543. Some systems don't need them.
  544. 12.3.3.3. Why aren't S headers guaranteed to be sequential so you could
  545. do ordering?
  546. Because HTTPU/HTTPMU is not interested in ordering. If one wants
  547. ordering one should use TCP.
  548. 12.3.3.4. Do S headers allow detecting and removing duplicates?
  549. Yes, for methods (like GET) that define a single responses to a
  550. request. No, for methods (like SEARCH) that define multiple
  551. responses to a request.
  552. 13. Interaction of HTTP, HTTPU and HTTPMU Messages
  553. 13.1. Problem Definition
  554. Goland, Schlimmer 14
  555. UPnP Forum UDP HTTP 24 Aug 2000
  556. [Ed. Note: Concerns include HTTPU request redirected to HTTP? > 1
  557. HTTPU responses to 1 HTTPMU request?]
  558. 13.2. Proposed Solution
  559. TBD
  560. 13.3. Design Rationale
  561. TBD
  562. 14. Security Considerations
  563. All the normal HTTP security considerations apply.
  564. 14.1. Cookies
  565. There is no danger that the S header will be used as a cookie since
  566. the client generates it, and the server returns it. (A cookie is
  567. generated by a server and returned by the client.)
  568. 14.2. Spoofing
  569. Servers and multicast resources could fake S headers, but this is
  570. not a major threat if some form of authentication over UDP is used.
  571. (Defining authentication over UDP is beyond the scope of this
  572. document, but briefly, one could assume the challenge and send the
  573. authentication response as part of the HTTPU/MU request.)
  574. 14.3. Lost Requests
  575. TBD
  576. 14.4. Oversized Requests
  577. TBD
  578. 15. Acknowledgements
  579. Thanks to John Stracke for his excellent comments. Dale Worley
  580. devised the single-response-per-each-copy-of-request mechanism
  581. outlined in the section on Retrying Requests. Chris Rude clarified
  582. request URI rules.
  583. 16. Constants
  584. MAX_RETRIES - 3
  585. MAX_RETRY_INTERVAL - 10 seconds
  586. MAX_MX - 120 seconds
  587. 17. Reference
  588. Goland, Schlimmer 15
  589. UPnP Forum UDP HTTP 24 Aug 2000
  590. [RFC2119] S. Bradner. Key words for use in RFCs to Indicate
  591. Requirement Levels. RFC 2119, March 1997.
  592. [RFC2616] R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk, L.
  593. Masinter, P. Leach and T. Berners-Lee. Hypertext Transfer Protocol -
  594. HTTP/1.1. RFC 2616, November 1998.
  595. 18. Authors' Address
  596. Yaron Y. Goland
  597. CrossGain
  598. 2039 152nd Avenue NE
  599. Redmond, WA 98052
  600. <mailto:yarongo@crossgain.com>
  601. Jeffrey C. Schlimmer
  602. Microsoft Corporation
  603. One Microsoft Way
  604. Redmond, WA 98052
  605. <mailto:jeffsch@microsoft.com>
  606. Goland, Schlimmer 16