mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
set content length header if not already set
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35825 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5e24b65085
commit
ccf505da7c
3 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-11-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSHTTPURLHandle.m: Set content-length header in outgoing
|
||||
request if not already set.
|
||||
|
||||
2012-11-25 14:39-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/Foundation/NSMetadata.h
|
||||
|
|
|
@ -404,11 +404,16 @@ debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
}
|
||||
}
|
||||
|
||||
if ([wData length] > 0)
|
||||
/* Ensure we set the correct content length (may be zero)
|
||||
*/
|
||||
if ((id)NSMapGet(wProperties, (void*)@"Content-Length") == nil)
|
||||
{
|
||||
NSMapInsert(wProperties, (void*)@"Content-Length",
|
||||
(void*)[NSString stringWithFormat: @"%d", [wData length]]);
|
||||
(void*)[NSString stringWithFormat: @"%d", [wData length]]);
|
||||
}
|
||||
|
||||
if ([wData length] > 0)
|
||||
{
|
||||
/*
|
||||
* Assume content type if not specified.
|
||||
*/
|
||||
|
@ -418,6 +423,7 @@ debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
(void*)@"application/x-www-form-urlencoded");
|
||||
}
|
||||
}
|
||||
|
||||
if ((id)NSMapGet(wProperties, (void*)@"Authorization") == nil)
|
||||
{
|
||||
NSURLProtectionSpace *space;
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
AutogsdocSource: NSMetadata.m
|
||||
*/
|
||||
|
||||
#import <Foundation/NSMetadata.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import "Foundation/NSMetadata.h"
|
||||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSString.h"
|
||||
#import "GNUstepBase/NSObject+GNUstepBase.h"
|
||||
|
||||
// Metadata item constants...
|
||||
|
|
Loading…
Reference in a new issue