bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19228] Discrepancy in Cocoa/GNUstepBase handling HTTP 401 status


From: Graham J Lee
Subject: [bug #19228] Discrepancy in Cocoa/GNUstepBase handling HTTP 401 status
Date: Wed, 07 Mar 2007 11:07:21 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/420+ (KHTML, like Gecko, Safari/420) OmniWeb/v607.17

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]