bugGNUstep - Bugs: bug #19228, Discrepancy in Cocoa/GNUstepBase...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Graham J Lee <iamleeg>
Submitted on:  Wed 07 Mar 2007 11:07:20 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 07 Mar 2007 02:01:20 PM UTC, comment #2:

I have changed the code in svn-trunk to call -cancelLoadInBackground if it receives an http status code outside the 200-299 range. I'm not sure that this matches the MacOS-X behavior ... just my guess at what they might be doing.

Richard Frith-Macdonald <CaS>
Project Member
Wed 07 Mar 2007 12:09:22 PM UTC, comment #1:

Same goes for HTTP 404 responses - test case updated.

Graham J Lee <iamleeg>
Wed 07 Mar 2007 11:07:20 AM UTC, original submission:

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.

Graham J Lee <iamleeg>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by iamleeg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Apr 2007 09:53:41 AM UTCCaSOpen/ClosedOpen=>Closed
    Wed 07 Mar 2007 02:01:20 PM UTCCaSStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1