diff src/cjr_print.sml @ 1691:ea292bf9431f

Avoid URL size limit in RPCs with large arguments
author Adam Chlipala <adam@chlipala.net>
date Sat, 03 Mar 2012 16:41:20 -0500
parents a12186d99e4f
children a1a1d66aebac
line wrap: on
line diff
--- a/src/cjr_print.sml	Sat Mar 03 16:20:54 2012 -0500
+++ b/src/cjr_print.sml	Sat Mar 03 16:41:20 2012 -0500
@@ -2971,6 +2971,18 @@
                      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,