Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLRequest, forwarding replaces settings in initial request



Hi,

to retrieve information from a homepage that only responds to selected clients with usable content, and empty strings to anyone else, I am using an NSMutableURLRequest with some faked user agent value. This worked fine until recently and I am not sure what exactly changed but here is what happens that I suspect causes the error.

The request is sent to the server of concern with my http header field pretending for the client to be Safari. The first request still has the entire header populated with the information I provide, then a response with the forwarding address from the server causes another GET to be triggered and a couple more then, but that second and all subsequent GETs contain as a user agent CFNetwork, not the Safari string I initially provide to my NSMutableURLRequest The cache policy is set to NSURLRequestReloadIgnoringCacheData.

How do I force for the initially set user-agent value to be used throughout all forwardings?

Thanks for any help.
Alex


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.