tus / tus-java-client

The tus client for Java.
https://tus.io
MIT License
213 stars 88 forks source link

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

Closed softboy99 closed 2 years ago

softboy99 commented 4 years ago

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"

Acconut commented 4 years ago

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 commented 2 years ago

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