[ https://issues.apache.org/jira/browse/AMQ-9516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856427#comment-17856427 ]
Ephemeris Lappis edited comment on AMQ-9516 at 6/20/24 9:33 AM: ---------------------------------------------------------------- After new tests, it seems that the API servlet has different behaviors depending on headers. This first request let the body unchanged : {noformat} curl -X POST -d "ABC001" -H "Authorization: Basic YWRtaW46YWRtaW4=" "https://myhost/activemq/api/message/_queue_?type=queue" {noformat} If I add a content type header, the 0x0A is added to the stored message : {noformat} curl -X POST -d "XYZ002" -H "Content-Type: text/plain" -H "Authorization: Basic YWRtaW46YWRtaW4=" "https://myhost:443/echanges/activ emq/apcurl -X POST -d "ABC002" -H "Content-Type: text/plain" -H "Authorization: Basic YWRtaW46YWRtaW4=" "https://myhost/activemq/api/message/_queue_?type=queue" {noformat} was (Author: ephemeris): After new tests, it seems that all messages are altered after changing the API servlet configuration to accept more than 100000 bytes (default maximum size). New tests with a very short requests (1, 2 or 3 bytes) are all stored in the queues with an extra 0x0A. > REST API adds unexpected byte when POSTing some messages > -------------------------------------------------------- > > Key: AMQ-9516 > URL: https://issues.apache.org/jira/browse/AMQ-9516 > Project: ActiveMQ Classic > Issue Type: Bug > Affects Versions: 5.18.3 > Reporter: Ephemeris Lappis > Priority: Major > > When sending messages using the REST API, some payloads are stored with an > unexpected byte (0x0A) at the end of the text. This can be verified in the > msg column field when using a JDBC persistence adapter. Sending the same > messages using a usual JMS (open-wire) connection has never the problem. This > issue is probably on the REST API's data handling... > Anyway, most of messages are correctly processed, and this random behavior is > perhaps depending on the size of the messages : for some of them the text is > around 170.000 bytes. Short messages seem not to be altered. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org For additional commands, e-mail: issues-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact