Updated SQSPoster to remove slash from the end of url endpoint

This commit is contained in:
Trial97
2019-03-05 16:00:39 +02:00
committed by Dan Christian Bogos
parent 89824ae37f
commit 9700004b0a
2 changed files with 1 additions and 1 deletions

View File

@@ -116,7 +116,6 @@ func TestMfEnvReaderITRead(t *testing.T) {
Reconnects: -1,
ConnectTimeout: time.Duration(1 * time.Second),
ReplyTimeout: time.Duration(2 * time.Second),
ResponseCacheTTL: time.Duration(0),
InternalTtl: time.Duration(2 * time.Minute),
LockingTimeout: time.Duration(0),
DigestSeparator: ",",

View File

@@ -581,6 +581,7 @@ func (pstr *SQSPoster) parseURL(dialURL string) (err error) {
qry := u.Query()
pstr.dialURL = strings.Split(dialURL, "?")[0]
pstr.dialURL = strings.TrimSuffix(pstr.dialURL, "/") // used to remove / to point to correct endpoint
pstr.queueID = defaultQueueID
if vals, has := qry[queueID]; has && len(vals) != 0 {
pstr.queueID = vals[0]