Re: stringWithContentsOfURL with resulting error 256
Re: stringWithContentsOfURL with resulting error 256
- Subject: Re: stringWithContentsOfURL with resulting error 256
- From: Jens Alfke <email@hidden>
- Date: Fri, 23 Oct 2009 10:54:16 -0700
On Oct 23, 2009, at 9:23 AM, James Lin wrote:
I tried curl and gotten "500 Internal Server Error-The server
encountered an internal error or misconfiguration and was unable to
complete your request."
That is a server error, just like it says. Something probably went
wrong inside your PHP script and it threw an exception. Was there
anything in the body of the response? PHP usually barfs a stack-trace
when it fails with an exception, doesn't it?
My guess would be that your script is expecting some particular HTTP
header that a browser sends but lower-level things like 'curl' or
CFNetwork don't, and fails if it isn't present.
Is this a bug with Cocoa?
'curl' has nothing to do with Cocoa. It's a cross-platform tool
written in pure C using Unix networking APIs.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden