• 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 POST with redirect.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFNetwork POST with redirect.


  • Subject: Re: CFNetwork POST with redirect.
  • From: Joshua <email@hidden>
  • Date: Sun, 29 Apr 2007 18:00:08 -0700 (PDT)

Excellent. libcurl did the trick, thanks for the advice. The problem I experienced with the CFNetwork api was the strict adherence to redirects continuing to be POST operations. Reading the API on libcurl it specifically said I could control this (among other things), and it worked great. I was also able to write about 5 lines of code compared to the hoops I had jump through just to get CFNetwork with callbacks to work.

- Josh

----- Original Message ----
From: Nathan Duran <email@hidden>
To: email@hidden
Sent: Sunday, April 29, 2007 10:03:55 AM
Subject: Re: CFNetwork POST with redirect.

> I have been trying to get POST with AutoRedirect to work using the CFNetwork
> interface (to a HTTPS server). However I have been unsuccessful and continue
> to get unexpected results. I have Windows code that does work, and here is
> what I see when I run that code and connect to the server: Watching traffic on
> the server it receives the POST, then issues a redirect. In Windows it then
> does a GET on the redirect.
>
> On a Mac using CFNetwork with POST with AutoRedirect and connecting to the
> same server I see the POST, but then on the redirect the client issues another
> POST which then results in an undesired url. Is there a way to stop the
> subsequent POSTs or force them to be GETs? I know I could turn off
> AutoRedirect but that isn't the desired behavior.
>
> Perhaps related... do CFNetwork interfaces automatically handle cookies? The
> server is also trying to set a cookie and I am wondering if this is also the
> reason the server doesn't continue the appropriate redirection.
>
> - Josh

Have you considered using libcurl instead?

--
Nathan S. Duran
Principal
KHI Ltd. Co., LLC
www.khiltd.com



 _______________________________________________
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

  • Prev by Date: Re: CFNetwork POST with redirect.
  • Previous by thread: Re: CFNetwork POST with redirect.
  • Index(es):
    • Date
    • Thread