Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4432

Server error if the message in an AU request was too large

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 8.6.3
    • Fix Version/s: None
    • Component/s: ZK Client Engine
    • Labels:

      Description

      Steps to Reproduce

      1. http://zkfiddle.org/sample/3e4hgq1/1-Another-new-ZK-fiddle
      2. click the button

      Current Result

      500: Form too large
      or
      400: Unable to parse form content

      (It depends on server implementations)

      Expected Result

      No error

      Debug Information

      https://stackoverflow.com/questions/3861455/form-too-large-exception

      Workaround

      Add system property to server

      Jetty:
      -Dorg.eclipse.jetty.server.Request.maxFormContentSize=5000000

      Or apply this patch:

      var oldAu = {};
          zk.override(zAu, oldAu, {
              sendNow: function (dt) {
                  zk.log('=============== fix Keikai 54');
                  // KEIKAI-54
                  if (!zk.mounting && dt._aureqs.length > 50) {
                      var size = 20,
                          data = dt._aureqs,
                          start = 0,
                          result = true;
                      while (true) {
                          dt._aureqs = data.slice(start, start + size);
                          if (!dt._aureqs.length) break;
      
                          if (!oldAu.sendNow(dt)) {
                              result = false;
                              break;
                          }
                          start += size;
                      }
                      if (start > 0 && start < data.length) {
                          dt._aureqs = data.slice(start);
                      }
                      return result;
                  } else {
                      return oldAu.sendNow(dt);
                  }
              }
          });
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rudyhuang rudyhuang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: