2

I'm trying to find a way to use QNetworkRequest/QUrl to upload files to S3 with a plus '+' character in the path.

The AWS S3 service violates the HTTP spec by interpreting '+' characters as a space. For example given a PUT request that starts with this on the wire:

PUT /my+file.jpg HTTP/1.1

Amazon will interpret this as "my file.jpg". The workaround is to send the request as:

PUT /my%2Bfile.jpg HTTP/1.1

The problem is there seems to be no way to have QNetworkRequest/QUrl encode the + character. Any ideas?

It's Amazon's bug but they will never fix it. It was mentioned years ago in this thread: https://forums.aws.amazon.com/thread.jspa?messageID=722673.

richb
  • 4,716
  • 5
  • 24
  • 22

0 Answers0