• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLRequest, forwarding replaces settings in initial request
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLRequest, forwarding replaces settings in initial request


  • Subject: Re: NSURLRequest, forwarding replaces settings in initial request
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 9 Feb 2006 09:30:38 -0800


On Feb 9, 2006, at 9:14 AM, alexander reichstadt wrote:

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.


Are you implementing connection:willSendRequest:redirectResponse: (or download:willSendRequest:redirectResponse:)? Those should allow you to inspect and alter subsequent requests, if that is really the issue.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSURLRequest, forwarding replaces settings in initial request (From: alexander reichstadt <email@hidden>)

  • Prev by Date: Re: NSURLRequest, forwarding replaces settings in initial request
  • Next by Date: Office Framework
  • Previous by thread: Re: NSURLRequest, forwarding replaces settings in initial request
  • Next by thread: Office Framework
  • Index(es):
    • Date
    • Thread