Subject: Re: CFNetwork POST with redirect.
On Apr 29, 2007, at 9:50 AM, Joshua wrote:
> 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.
I doubt the server's cookies have anything to do with it. The desired
behavior for redirects is laid out pretty well in the HTTP RFC
(
http://www.ietf.org/rfc/rfc2616.txt) but it varies based on the type
of redirect being encountered, and the request method. Many of the
redirect cases hinge on prompting the user to confirm the new value.
See section 10.3.x of the RFC.
So I imagine the "auto redirect" in CFNetwork is not really intended
to be used for methods (namely, POST), where the user's interaction
is generally required.
NSURLConnection has a "connection:willSendRequest:..." method where
the client can manipulate redirect requests, but I'm not sure if
CFHTTP has a similar hook.
Is this particular redirect you're running into something you're
seeing in the wild, or is it a URL you're in charge of? If you have
the ability to do so, it might make sense to avoid redirects on URLs
where a
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