In the XMLHttpRequest spec, for setRequestHeader(), the spec states:

  "If the header argument is in the list of request headers either use
   multiple headers, combine the values or use a combination of those
   (section 4.2, RFC 2616). [RFC2616]"

And RFC 2616 states:

  "Multiple message-header fields with the same field-name MAY be
   present in a message if and only if the entire field-value for that
   header field is defined as a comma-separated list"

So, what should the UA do for headers that are not defined to be comma-separated? For example, in the case of setting Content-Type twice to two different values, does the latter override the former?

[...]
client.setRequestHeader("Content-Type", "text/plain");
client.setRequestHeader("Content-Type", "text/html");
client.send(data);

--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Reply via email to