URL:
<http://savannah.gnu.org/bugs/?19228>
Summary: Discrepancy in Cocoa/GNUstepBase handling HTTP 401
status
Project: GNUstep
Submitted by: iamleeg
Submitted on: Wednesday 03/07/2007 at 11:07
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
See the file tests/testsuite/base/NSURLHandle/test01.m
On Cocoa, when you load a resource with an NSURLHandle over HTTP, and the
server returns a 401 status code:
* [handle loadInForeground] returns nil
* [handle status] is set to NSURLHandleNotLoaded
whereas with -base:
* [handle loadInForeground] returns the data in the body of the response
* [handle status] is set to NSURLHandleLoaded
in both cases, [handle propertyForKey: @"WWW-Authenticate"] is correctly set
to the WWW-Authenticate header. To me, both of these approaches are a little
bizarre: if the webserver returned data, then that should be available after
the fetch (as -base does, and Cocoa doesn't). OTOH, the resource which we
set out to get hasn't yet been retrieved, so NSURLHandleNotLoaded is
appropriate (as Cocoa does and -base doesn't). Still, the discrepancy's
there.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?19228>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep