comparison lib/js/urweb.js @ 1162:24a62b6412c4

Set additional request headers for POST RPCs
author Adam Chlipala <adamc@hcoop.net>
date Tue, 09 Feb 2010 17:00:31 -0500
parents e1d738870086
children 26fed2c4f5be
comparison
equal deleted inserted replaced
1161:2ae57fa551be 1162:24a62b6412c4
667 function requestUri(xhr, uri, needsSig) { 667 function requestUri(xhr, uri, needsSig) {
668 if (unloading) 668 if (unloading)
669 return; 669 return;
670 670
671 xhr.open("POST", uri, true); 671 xhr.open("POST", uri, true);
672 xhr.setRequestHeader("Content-type", "text/plain");
673 xhr.setRequestHeader("Content-length", "0");
674 xhr.setRequestHeader("Connection", "close");
672 675
673 if (client_id != null) { 676 if (client_id != null) {
674 xhr.setRequestHeader("UrWeb-Client", client_id.toString()); 677 xhr.setRequestHeader("UrWeb-Client", client_id.toString());
675 xhr.setRequestHeader("UrWeb-Pass", client_pass.toString()); 678 xhr.setRequestHeader("UrWeb-Pass", client_pass.toString());
676 } 679 }