Open Drazail opened 4 years ago
Same problem. Good explanation. My user has TR
locale and got exact the same error
Same here, the 'i' causes problems with another header, but the problem is the same: RNFetchBlob request error: Unexpected char 0x131 at 0 in header name: ıf-modified-sincenull The guy has Android Galaxy A71 with Turkish locale and the app sets the header like this: 'If-Modified-Since' so the capital first 'I' has issues.
same problem with Joplin app.
this project seems to be unmaintained but i made a pull request anyway: https://github.com/joltup/rn-fetch-blob/pull/762
same problem with Joplin app.
Telefonun dilini(uygulamanın değil) bir kereliğine ingilizceye alıp senkronizasyon yapınca sorun çözülüyor. Sonra türkçe yapabilirsiniz. 😬
şimdi denedim. ilk sefer de problem çözülmüş gibi göründü. fakat yeni not ekleyince aynı hatayı verdi: Unexpected char 0x131 at 0 in header name: ıf-none-matchnull heralde microsoft veya google'dan birine teslim olmak zorundayız :(
şimdi denedim. ilk sefer de problem çözülmüş gibi göründü. fakat yeni not ekleyince aynı hatayı verdi: Unexpected char 0x131 at 0 in header name: ıf-none-matchnull heralde microsoft veya google'dan birine teslim olmak zorundayız :(
Şifre ekleyince ya da şifreyi değiştirince yeniden ilk sefer için telefonun dilini ingilizceye çevirip bir kere daha senkronize etmek gerekiyor
şimdi denedim. ilk sefer de problem çözülmüş gibi göründü. fakat yeni not ekleyince aynı hatayı verdi: Unexpected char 0x131 at 0 in header name: ıf-none-matchnull heralde microsoft veya google'dan birine teslim olmak zorundayız :(
Şifre ekleyince ya da şifreyi değiştirince yeniden ilk sefer için telefonun dilini ingilizceye çevirip bir kere daha senkronize etmek gerekiyor
I don't understand Turkish but this issue was fixed in this fork: https://github.com/RonRadtke/react-native-blob-util
Environment
library version: 0.11.2 react: 16.13.0 react-native: 0.61.5 OS: Android
Description
there is this strange problem we are facing while trying to make a post request on android:
the header key we pass to the
JS
API is:'X-MOBILE-APP-VERSION'
however on the
native
side RNFetchBlob tries to set the header as:x-mobıle-app-versıonnull
this issue happens only when device's language is set to Turkish and the header is in caps. ( presumably ,depending on the header, other non ASCII languages should face the same problem)
Speculation
seems to be originating from
.toLowerCase()
inRNFetchBlobReq.java
StackTrace:
Error RNFetchBlob request error: Unexpected char 0x131 at 5 in header name: x-mobıle-app-versıonnull node_modules/rn-fetch-blob/index.js:307:25 node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:483:12 value node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:28 node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:8 value node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:17 value [native code] value
CodeSample
the following lines seems to be the problem: