Pix4D / cogito

Concourse resource for GitHub Commit Status and Google Chat notifications
MIT License
35 stars 14 forks source link

cogito: properly encode url #153

Closed aliculPix4D closed 3 months ago

aliculPix4D commented 4 months ago

cogito: properly encode url

Actually, the only problem that existed was due the way spaces were encoded. Even the most complex case with nested json worked fine with the existing code. The only thing "missing" was the proper encoding of spaces.

Concourse requires that the space characters are encoded as %20 instead of +. On the other hand golangs url.QueryEscape as well as url.Values.Encode() both encode the space as a + character. See: https://github.com/golang/go/issues/4013

Fixes: https://github.com/Pix4D/cogito/issues/148

aliculPix4D commented 4 months ago

See: Screenshot from 2024-03-22 10-55-58

the link for autocat (from my local concourse deployment) correctly points to the build. The pipeline was worst case scenario possible: nested json with spaces

Sadly, we can't test this better in our Concourse deployment because we don't have CONCOURSE_ENABLE_PIPELINE_INSTANCES enabled.