Re: stringWithContentsOfURL with resulting error 256

2009-10-23 Thread Jens Alfke
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

Re: stringWithContentsOfURL with resulting error 256

2009-10-23 Thread James Lin
Hi, Thank you for the great tip... I tried curl and gotten "500 Internal Server Error-The server encountered an internal error or misconfiguration and was unable to complete your request." But how can I troubleshoot this one? My ISP is sure going to come back to me with "It works in our se

Re: stringWithContentsOfURL with resulting error 256

2009-10-22 Thread John Horigan
Try using curl (the command-line utility) to see _exactly_ what Cocoa gets from the server when it accesses that URL. The server could be doing something that confuses Cocoa but which PHP and Safari handle properly. -- john On Oct 22, 2009, at 8:52 AM, Jens Alfke wrote: On Oct 22, 2009,

Re: stringWithContentsOfURL with resulting error 256

2009-10-22 Thread Jens Alfke
On Oct 22, 2009, at 7:16 AM, James Lin wrote: NSString *result = [NSString stringWithContentsOfURL:theURL encoding:NSUTF8StringEncoding error:&error]; However, the result comes back with an NSError as the following: Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x15d7b0 "Operation could