summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-03-03 16:41:20 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-03-03 16:41:20 -0500
commit2a42899039b15444e8445300c8562e8934e8876a (patch)
treee4a0eb42be56f403faac02622cde27ac61e323c5 /src/cjr_print.sml
parent53e8eba14aba951cef1e1a1428612a31d88ec0a7 (diff)
Avoid URL size limit in RPCs with large arguments
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 65344ffb..29b0f5d2 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2971,6 +2971,18 @@ fun p_file env (ds, ps) =
newline,
string "if (*request == '/') ++request;",
newline,
+ case ek of
+ Rpc _ => box [string "if (uw_hasPostBody(ctx)) {",
+ newline,
+ box [string "uw_Basis_postBody pb = uw_getPostBody(ctx);",
+ newline,
+ string "if (pb.data[0])",
+ newline,
+ box [string "request = uw_Basis_strcat(ctx, request, pb.data);"],
+ newline],
+ string "}",
+ newline]
+ | _ => box [],
if couldWrite ek andalso not (Settings.checkNoXsrfProtection s) then
box [string "{",
newline,