You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This piece of code in UNIHTTPRequest.m is forcibly setting all header keys to lower case. This is causing problems with the remote API I'm using as it's custom headers are case sensitive. I don't understand why this would be a thing in the first place.
The code that's causing the issue:
NSMutableDictionary* lowerCaseHeaders = [[NSMutableDictionary alloc] init];
if (headers != nil) {
for(id key in headers) {
id value = [headers objectForKey:key];
[lowerCaseHeaders setObject:value forKey:[key lowercaseString]];
}
}
[self setHeaders:lowerCaseHeaders];
I fixed it by changing this to
[self setHeaders:headers];
I feel that this should either be an option that you can turn on/off, or you should leave it entirely up to the end user. Someone implementing this should have a clear indications that the header keys are forcibly set to lower case and be able to turn it off if they want.
The text was updated successfully, but these errors were encountered:
As I post this I realize that this library hasn't been updated in 3 years. Well, in case anyone else runs into this same issue, at least you know why now ;)
This piece of code in
UNIHTTPRequest.m
is forcibly setting all header keys to lower case. This is causing problems with the remote API I'm using as it's custom headers are case sensitive. I don't understand why this would be a thing in the first place.The code that's causing the issue:
I fixed it by changing this to
I feel that this should either be an option that you can turn on/off, or you should leave it entirely up to the end user. Someone implementing this should have a clear indications that the header keys are forcibly set to lower case and be able to turn it off if they want.
The text was updated successfully, but these errors were encountered: