Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-283

Long POST parameter is truncated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.Beta6
    • 1.0.14.Final
    • AJP
    • Hide
      1. Make sure apache with mod_jk is installed and configured for HTTPS (probaly HTTP will be sufficient)
      2. Install WildFly 8.1.0.Final
      3. Add ajp listener to default-server in undertow subsystem:
        <ajp-listener name="ajp" socket-binding="ajp"/>
      4. Start server and deploy the debit.war application. This application will only dump the received request, get the problematic parameter and will check it validity.
      5. Modify HttpTestClient.java to be suitable for your environment (probably HTTPS part can be ommited) and compile it.
      6. Execute HttpTestClient and see results.
      Show
      Make sure apache with mod_jk is installed and configured for HTTPS (probaly HTTP will be sufficient) Install WildFly 8.1.0.Final Add ajp listener to default-server in undertow subsystem: <ajp-listener name="ajp" socket-binding="ajp"/> Start server and deploy the debit.war application. This application will only dump the received request, get the problematic parameter and will check it validity. Modify HttpTestClient.java to be suitable for your environment (probably HTTPS part can be ommited) and compile it. Execute HttpTestClient and see results.

    Description

      We are sending uploaded file (image,pdf, etc) to the server to be saved in the database.
      The file is Base64 encoded and sent as XML field, i.e.

      <?xml version="1.0" ?>
       <Request>
        <Binary_File>R0lGODlhkA....long Base64 string....s=</Binary_File>
      </Request>
      

      While sending this XML as POST parameter it's truncated,
      i.e. when we get the parameter in the HttpServletRequest.getParameter method the result looks like this:

      <?xml version="1.0" ?>
      <Request>
        <Binary_File>R0lGODlhkA....long Base64 string...9g0l1Pv9/n8
      

      Exactly the same problem occurs on WildFly 8.0.0.Final and WildFly 8.1.0.Final and never on JBoss5.

      It’s looks like the problem is related to timing: on our development server the problem to success ratio is ~ 14/6. When we run apache and mod_jk in debug mode the ratio was swapped, i.e. 14 successful / 6 failed requests. On production servers almost all of the requests failed (even with apache and mod_jk debug mode enabled).

      Output of the mod_jk (saved as TCP dump) for both successful and failed request is exactly the same.

      When comparing the successful and failed data received by server (server_dump_OK.txt and server_dump_ERROR.txt) we see that in failed case the block before the last one is inserted twice, i.e. in success we see blockX+last block; in failed – blockX+blockX.

      Attachments

        1. debit.war
          5 kB
        2. HttpTestClient.java
          2 kB
        3. request.xml
          265 kB
        4. server_dump_ERROR.txt
          1.25 MB
        5. server_dump_OK.txt
          1.24 MB

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            jacobber Jacob Berezovsky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: