changeset 1037:83d8ddd09d95

Send RPCs with POST, to avoid caching
author Adam Chlipala <adamc@hcoop.net>
date Sat, 21 Nov 2009 14:29:35 -0500
parents e214ac93d73e
children dcc6093e9575
files lib/js/urweb.js src/c/request.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/js/urweb.js	Sat Nov 21 13:50:59 2009 -0500
+++ b/lib/js/urweb.js	Sat Nov 21 14:29:35 2009 -0500
@@ -610,7 +610,7 @@
 var sig = null;
 
 function requestUri(xhr, uri, needsSig) {
-  xhr.open("GET", uri, true);
+  xhr.open("POST", uri, true);
 
   if (client_id != null) {
     xhr.setRequestHeader("UrWeb-Client", client_id.toString());
--- a/src/c/request.c	Sat Nov 21 13:50:59 2009 -0500
+++ b/src/c/request.c	Sat Nov 21 14:29:35 2009 -0500
@@ -172,8 +172,9 @@
   if (!strcmp(method, "POST")) {
     char *clen_s = uw_Basis_requestHeader(ctx, "Content-length");
     if (!clen_s) {
-      log_error(logger_data, "No Content-length with POST\n");
-      return FAILED;
+      clen_s = "0";
+      /*log_error(logger_data, "No Content-length with POST\n");
+      return FAILED;*/
     }
     int clen = atoi(clen_s);
     if (clen < 0) {