Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8867

REST server fails to convert between text formats and octet-stream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.2.0.Final
    • 9.2.0.Final
    • None
    • None

      Using the default cache with no MediaType configuration:

      The following request returns error 500:

      curl -v -u user:pass -XPUT -H "Content-type: application/xml"  -d "<root>element</root>"  http://localhost:8080/rest/default/1
      

      The following request succeds:

      curl -v -u user:pass -XPUT -H "Content-type: application/json"  -d '{ "name": "test"}'  http://localhost:8080/rest/default/2
      

      But when reading it back it returns "[B@26197e2f" instead of the inserted document.

      curl -v -u user:pass -H "Content-type: text/plain"  http://localhost:8080/rest/default/2
      

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            gfernand@redhat.com Gustavo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: