Wrong HTTP POST URL from 2nd outcommunicate in channel

13 views
Skip to first unread message

Alessandro Rubino

unread,
Oct 27, 2022, 6:24:39 AM10/27/22
to bots...@googlegroups.com
Hello,
When using an HTTP output channel, bots sends files on the wrong
endpoint from the second file forward.
An example setup:
hostname: localhost
port: 3000
path: my-path

bots will correctly POST the first file to
http://localhost:3000/my-path
but from the second file onward they will be posted to
http://localhost:3000/my-path/<filename>
Where <filename> is whatever filename bots generated for the previous
file sent.

This happens because the Uri class used to store the URI is mutable, and
its filename property is updated to update the transaction regarding the
file sent.
I updated the http class for my uses, as detailed in the attached patch,
but I believe a change should be included in a future release.
A different solution could be using a new Uri object for each file sent.

Cheers,
Alessandro Rubino
http_post_url.patch
Reply all
Reply to author
Forward
0 new messages