diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-11-21 14:29:35 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-11-21 14:29:35 -0500 |
commit | c093f1381ed3851c75aafa8f10725c31e1b368d2 (patch) | |
tree | e54fbd7d89a40f9432778eedd31f41ffded4ca52 | |
parent | 95bdfc31cee22f24bc3b239751d2d4a416014436 (diff) |
Send RPCs with POST, to avoid caching
-rw-r--r-- | lib/js/urweb.js | 2 | ||||
-rw-r--r-- | src/c/request.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 5885143e..9f3c332f 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -610,7 +610,7 @@ function getXHR(uri) 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()); diff --git a/src/c/request.c b/src/c/request.c index 13cf1084..069de4aa 100644 --- a/src/c/request.c +++ b/src/c/request.c @@ -172,8 +172,9 @@ request_result uw_request(uw_request_context rc, uw_context ctx, 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) { |