• 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: NSURLConnection inserting Accept-Language and Accept headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection inserting Accept-Language and Accept headers


  • Subject: Re: NSURLConnection inserting Accept-Language and Accept headers
  • From: "Michael C. Silva" <email@hidden>
  • Date: Fri, 25 Sep 2009 20:17:52 -0400

Thanks for the advice all.  this did the trick!

Mike


On Sep 25, 2009, at 6:04 AM, Quinn wrote:

At 11:49 -0700 21/9/09, Mark Pauley wrote:
Thanks for the report. You may be able to cut them out of the request during the willSendRequest delegate message handler, which is called just before we send any request.

This seems to work. Three things to consider:

o In your willSendRequest delegate method you can't just modify the request because it's not mutable. Use -mutableCopy to make a mutable copy of it.

o You can't remove a header by calling -setAllHTTPHeaderFields: because that method merges the values from the dictionary you supply into the request. Instead you have to call - setValue:forHTTPHeaderField: with a nil value.

o I was testing on 10.6. YMMV on earlier systems because the URL loading system has changed a lot in the last year or so.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/ >
Apple Developer Relations, Developer Technical Support, Core OS/ Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSURLConnection inserting Accept-Language and Accept headers (From: Michael C.Silva <email@hidden>)
 >Re: NSURLConnection inserting Accept-Language and Accept headers (From: Mark Pauley <email@hidden>)
 >Re: NSURLConnection inserting Accept-Language and Accept headers (From: Quinn <email@hidden>)

  • Prev by Date: Re: BSD socket accept() fd leak on iphone OS
  • Next by Date: Re: BSD socket accept() fd leak on iphone OS
  • Previous by thread: Re: NSURLConnection inserting Accept-Language and Accept headers
  • Next by thread: Re: NSURLConnection inserting Accept-Language and Accept headers
  • Index(es):
    • Date
    • Thread