• 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: CFNetwork is not adding Authorization: headers proactively
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFNetwork is not adding Authorization: headers proactively


  • Subject: Re: CFNetwork is not adding Authorization: headers proactively
  • From: Wim Lewis <email@hidden>
  • Date: Mon, 22 Feb 2016 11:57:00 -0800

On Feb 18, 2016, at 11:32 AM, Jens Alfke <email@hidden> wrote:
I discovered yesterday that the networking layer of our library, which talks to a REST API, is sending every request twice when the server uses HTTP Basic auth. This obviously reduces performance, especially over high-latency cellular networks. It’s especially bad when we send a POST or PUT request with a large body (like a media attachment), because the body will get sent at full speed until the server responds, and then it gets sent again.

The other thing that a well-written client can do in that case is make use of the "Expect: continue" header to allow the server to accept or reject the request (or request authorization) before the large POST/PUT body is sent. I don't know offhand if there's a way to get CFNetwork to do that.

    http://tools.ietf.org/html/rfc7231#section-5.1.1


(If do you gain any insight into how to hint NSURLSession to do particular things with credentials, please share! This has been a pain point for us as well.)



 _______________________________________________
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

  • Follow-Ups:
    • Re: CFNetwork is not adding Authorization: headers proactively
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
    • Re: CFNetwork is not adding Authorization: headers proactively
      • From: Jens Alfke <email@hidden>
References: 
 >CFNetwork is not adding Authorization: headers proactively (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: What does NSURLCredentialPersistenceForSession mean, exactly?
  • Next by Date: Re: CFNetwork is not adding Authorization: headers proactively
  • Previous by thread: Re: CFNetwork is not adding Authorization: headers proactively
  • Next by thread: Re: CFNetwork is not adding Authorization: headers proactively
  • Index(es):
    • Date
    • Thread