Extension to support SOAP by allowing us to get status 500 responses

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28028 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-03-03 19:45:40 +00:00
parent b85f364024
commit 22d4b3470d
4 changed files with 25 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2009-03-02 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSURLHandle.h: Add new key.
* Source/NSURLHandle.m: Ditto
* Source/GSHTTPURLHandle.m: When a request completes with an HTTP
status code outside the 200-299 range, report it as a load complete
rather than cancelling the load is the new 'ReturnAll' key is set.
2009-03-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBundle.m (-localizedStringForKey:value:table): Correct

View file

@ -115,6 +115,13 @@ GS_EXPORT NSString * const GSHTTPPropertyKeyFileKey;
*/
GS_EXPORT NSString * const GSHTTPPropertyPasswordKey;
/**
* Key for passing to [NSURLHandle]'s <code>propertyForKey..</code> methods to
* specify that all results should be returned, not just those where the
* HTTP status code is in the 200-299 range.
*/
GS_EXPORT NSString * const GSHTTPPropertyReturnAllKey;
#endif
/**

View file

@ -744,7 +744,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
bodyPos = 0;
DESTROY(wData);
NSResetMapTable(wProperties);
if (code >= 200 && code < 300)
if ((code >= 200 && code < 300)
|| [[request objectForKey: GSHTTPPropertyReturnAllKey] boolValue])
{
[self didLoadBytes: [d subdataWithRange: r]
loadComplete: YES];
@ -1513,6 +1514,11 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
* to 8080 for <code>http</code> and 4430 for <code>https</code>.
* </item>
* <item>
* GSHTTPPropertyReturnAllKey - specify whether the handle is to
* return all HTTP responses, or only those where the code is in
* the range from 200 to 299.
* </item>
* <item>
* Any NSHTTPProperty... key
* </item>
* </list>

View file

@ -88,6 +88,9 @@ NSString * const GSHTTPPropertyKeyFileKey
NSString * const GSHTTPPropertyPasswordKey
= @"GSHTTPPropertyPasswordKey";
NSString * const GSHTTPPropertyReturnAllKey
= @"GSHTTPPropertyReturnAllKey";
/**
* <p>