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 | d967a12fd83892bb8bfb663dec6b989643ca21c2 (patch) | |
tree | e54fbd7d89a40f9432778eedd31f41ffded4ca52 | |
parent | de782f9f8f032913d2213065bd54ba0eae48e488 (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) { |