mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix NSURLSession header fields not always being matched case insensitive.
This commit is contained in:
parent
18f81f9ccc
commit
cb6c53b84d
5 changed files with 24 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2023-01-13 Frederik Seiffert <frederik@algoriddim.com>
|
||||
|
||||
* Source/Additions/GSInsensitiveDictionary.m:
|
||||
* Source/NSURLRequest.m:
|
||||
* Source/NSURLResponse.m:
|
||||
Fix NSURLSession header fields not always being matched case
|
||||
insensitive.
|
||||
|
||||
2023-01-13 Frederik Seiffert <frederik@algoriddim.com>
|
||||
|
||||
* Source/GSEasyHandle.m:
|
||||
|
|
|
@ -378,6 +378,13 @@ static SEL objSel;
|
|||
return [copy initWithDictionary: self copyItems: NO];
|
||||
}
|
||||
|
||||
- (id) mutableCopyWithZone: (NSZone*)z
|
||||
{
|
||||
NSMutableDictionary *copy = [_GSMutableInsensitiveDictionary allocWithZone: z];
|
||||
|
||||
return [copy initWithDictionary: self copyItems: NO];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithCapacity: 0];
|
||||
|
|
|
@ -3345,7 +3345,6 @@ unfold(const unsigned char *src, const unsigned char *end, BOOL *folded)
|
|||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||
@end
|
||||
|
|
|
@ -118,7 +118,7 @@ typedef struct {
|
|||
inst->shouldHandleCookies = this->shouldHandleCookies;
|
||||
inst->debug = this->debug;
|
||||
inst->ioDelegate = this->ioDelegate;
|
||||
inst->headers = [this->headers mutableCopy];
|
||||
inst->headers = [this->headers mutableCopy];
|
||||
}
|
||||
}
|
||||
return o;
|
||||
|
|
|
@ -284,8 +284,15 @@ typedef struct {
|
|||
textEncodingName: nil];
|
||||
if (nil != self)
|
||||
{
|
||||
NSString *k;
|
||||
NSEnumerator *e = [headerFields keyEnumerator];
|
||||
while (nil != (k = [e nextObject]))
|
||||
{
|
||||
NSString *v = [headerFields objectForKey: k];
|
||||
[self _setValue: v forHTTPHeaderField: k];
|
||||
}
|
||||
|
||||
this->statusCode = statusCode;
|
||||
this->headers = [headerFields copy];
|
||||
[self _checkHeaders];
|
||||
}
|
||||
return self;
|
||||
|
|
Loading…
Reference in a new issue