Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-683

KieRemoteHttpRequest sends incorrect "content length" on http rest request.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Backlog
    • None
    • REST API
    • None
    • Low
    • NEW
    • NEW

      Hello all

      KieRemoteHttpRequest calculate content_length header value and bytes to send with different functions.

      For content length it uses this code:
      contentLength = requestInfo.body.toString().getBytes().length;

      And for sending bytes this one:
      final ByteBuffer bytes = encoder.encode(CharBuffer.wrap(value));
      super.write(bytes.array(), 0, bytes.limit());

      The result is an exception "Unable to add char sequence to request body" fired.

      Strangely with a java application with a small data set it runs correctly, but when I try to use this class in an axis proyect (my axis2 receive requests and calls kie execution server container), the exception fires.

      I use spanish charset, so perhaps is a codification problem.

      Regards

        1. Content_length.png
          39 kB
          Carmen Pereira
        2. Post size.png
          30 kB
          Carmen Pereira

              Unassigned Unassigned
              carmen_pereira Carmen Pereira (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: