PubSub Framework Fails On Authenticated Gmail Feed

Number:rdar://10475065 Date Originated:11/19/2011
Status:Open Resolved:
Product:Mac OS X Product Version:10.7.2
Classification:Other Bug Reproducible:Always
Summary: When using the PubSub Framework with the authenticated Gmail feed at, it returns the error 

"Last Error: Error Domain=NSURLErrorDomain Code=-1013 "A username and password are required" UserInfo=0x102027790 {NSLocalizedDescription=A username and password are required}" 

even when the username and password are set correctly using the PSFeed's setLogin: and setPassword: methods.

Steps to Reproduce:

    PSFeed *f = [n object];
    NSLog(@"Last Error: %@", [f lastError]);

    PSClient *client = [PSClient applicationClient];
    NSURL    *url    = [NSURL URLWithString:@""];
    PSFeed   *feed   = [client addFeedWithURL:url];

    [feed setLogin: @""];
    [feed setPassword: @"correctPassword"];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(feedRefreshing:) name:PSFeedRefreshingNotification object:nil];

    [feed refresh:NULL];

Expected Results:
No error would be printed

Actual Results:
The error message 

Error Domain=NSURLErrorDomain Code=-1013 "A username and password are required" UserInfo=0x1004164a0 {NSLocalizedDescription=A username and password are required}

is printed instead.



The feed can be retrieved from Safari as well as by authenticating using a NSURLConnection delegate.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!