tus-java-client icon indicating copy to clipboard operation
tus-java-client copied to clipboard

Which httpclient this lib used?How to pass utf-8 encoding headers to the server?

Open softboy99 opened this issue 5 years ago • 1 comments

When use tusClient.setheaders, the serverside get wrongly encoded header values. I know we can use URLEncode to encode the header and server side to decode. But what i wrote is a common way for uploading, some of the header transported doesn't need to URLEncode. If encode will broke the "common"

softboy99 avatar Jul 17 '20 12:07 softboy99

tus-java-client uses the HttpUrlConnection, which is included in Java. Here is a brief example of how to to encode UTF-8 values for use in headers: https://stackoverflow.com/a/11213261 Simply pass the output of URLEncoder.encode to the TusClient#setHeaders method.

Acconut avatar Jul 19 '20 08:07 Acconut

Closing this issue due to inactivity. Feel free to leave a comment if you want to continue the discussion :)

Acconut avatar Oct 18 '22 09:10 Acconut