Re: NSURLRequest returning bizarre page

2013-06-11 Thread Greg Parker
On Jun 10, 2013, at 5:32 PM, Trygve Inda wrote: > http://www.celestrak.com/NORAD/elements/stations.txt The JavaScript redirect you showed earlier appears to be that server's broken attempt to display a "page not found" error. Note the Content-Location header with "404" in it. Perhaps the file

Re: NSURLRequest returning bizarre page

2013-06-11 Thread Manoah F. Adams
Hello, [this message updated; previous message failed to get posted to the list] I noticed that the garbling is always "^M\n" -- indicating to me there is a newline/linebreak encoding issue. (especially since the server is a Microsoft monster). 2 ideas in order of likelihood: === (1) ==

Re: NSURLRequest returning bizarre page

2013-06-10 Thread Jens Alfke
On Jun 10, 2013, at 5:06 PM, Trygve Inda wrote: > However, on some customer's systems, despite NSError not showing anything > wrong, I get: That’s a web page with a pretty clumsy way of redirecting to `/redirect.asp?loc=` followed by the actual URL. I have no idea why someone would do this in

Re: NSURLRequest returning bizarre page

2013-06-10 Thread Trygve Inda
> Well, that's it, isn't it? > > > On Jun 10, 2013, at 8:32 PM, Trygve Inda wrote: > >>> What is the header of the file being fetched set to? >>> >>> On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote: >> >> I believe it is just a plain text file. Safari will not allow me to view >> source on the

Re: NSURLRequest returning bizarre page

2013-06-10 Thread Alex Zavatone
Well, that's it, isn't it? On Jun 10, 2013, at 8:32 PM, Trygve Inda wrote: >> What is the header of the file being fetched set to? >> >> On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote: > > I believe it is just a plain text file. Safari will not allow me to view > source on the page and FireFox

Re: NSURLRequest returning bizarre page

2013-06-10 Thread Trygve Inda
> What is the header of the file being fetched set to? > > On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote: I believe it is just a plain text file. Safari will not allow me to view source on the page and FireFox says: text/plain ISO-8859-1 FireFox also says: The character encoding of the plain

Re: NSURLRequest returning bizarre page

2013-06-10 Thread Alex Zavatone
What is the header of the file being fetched set to? On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote: > I am using the following code (url changed, but it is a .txt file) > > NSString* tleAddress = @"http://www.somesite.com/somefile.txt";; > > NSURLRequest* tleRequest = [NSURLRequest requestWith

Re: NSURLRequest timing

2011-09-14 Thread Jerry Krinock
On 2011 Sep 14, at 10:21, lcerveau wrote: > - At the same time I use a software like HTTPScoop to look on how it is > timing all this. Time are always différent like 0.05 seconds. I'm not familiar with HTTPScoop, but 50 milliseconds is typical for a single ping on the internet. > > So nearly

Re: NSURLRequest and NSOperationQueue

2010-01-18 Thread Keith Duncan
On 18 Jan 2010, at 16:37, Clint Shryock wrote: > I had the same issue in the past using NSOperationQueue and NSURLConnection, > and I resolved it by simply telling NSURLConnection to send using > synchronously using sendSynchronousRequest:returningResponse:error: > > Would that not take care of

Re: NSURLRequest and NSOperationQueue

2010-01-18 Thread Clint Shryock
I had the same issue in the past using NSOperationQueue and NSURLConnection, and I resolved it by simply telling NSURLConnection to send using synchronously using sendSynchronousRequest:returningResponse:error: Would that not take care of the issue? +Clint On Sun, Jan 17, 2010 at 1:55 PM, J. Sco

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread J. Scott Tury
The issue that Dave has run into is that when you call the asynchronous NSURLConnection call, NSURLConnection looks to see what thread you are calling it on, and it will only call your delegate back on that Thread (if it exists). If you exit your NSOperation main method, your thread is going to

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread Dave DeLong
Thanks for the responses! It hadn't occurred to me to spin the runloop myself. My main reason for using an NSOperationQueue for the connections was because the spawner of the connections was also the connection delegate, and it would've taken some interesting code dancing to handle the delegate

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread Keith Duncan
> Solution 1 would be to have you do a synchronous NSURLConnection in your main > method. This will show you everything is working in that thread and that you > do indeed get data back from your server. This isn't a good idea since it limits the cancelabilty of your operation. > NSRunLoop* cur

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread J. Scott Tury
Dave, If you are setting up NSURLConnection on an NSOperation, I would suggest you keep the operation around as you get the data back. The symptom you describe, sounds like you are starting the NSURLConnection, but then you leave your main method in the NSOperation you created. This essentia

Re: NSURLRequest SSL Mac vs iPhone

2009-10-16 Thread Alastair Houghton
On 16 Oct 2009, at 15:52, Greg Hoover wrote: It's signed by Verisign. Where does NSURLRequest and its supporting routines find the CA root certs? Are you sure it's the root certificate that it needs and not some certificate beneath that? Some CAs sign their SSL certs with certificates a

Re: NSURLRequest SSL Mac vs iPhone

2009-10-16 Thread Jens Alfke
On Oct 16, 2009, at 7:52 AM, Greg Hoover wrote: It's signed by Verisign. Where does NSURLRequest and its supporting routines find the CA root certs? In the Keychain. You can see the list of pre-installed root certs by launching Keychain Access and selecting "System Roots" from the keych

Re: NSURLRequest SSL Mac vs iPhone

2009-10-16 Thread Greg Hoover
On Oct 16, 2009, at 1:13 AM, Andrew Farmer wrote: On 16 Oct 2009, at 00:48, Greg Hoover wrote: I have the same piece of code making a secure request to a server in a Mac application and in an iPhone app. Both use an NSURLRequest with exactly the same settings, message, body, etc. On the

Re: NSURLRequest SSL Mac vs iPhone

2009-10-16 Thread Andrew Farmer
On 16 Oct 2009, at 00:48, Greg Hoover wrote: I have the same piece of code making a secure request to a server in a Mac application and in an iPhone app. Both use an NSURLRequest with exactly the same settings, message, body, etc. On the Mac, the request succeeds, returning the data expect

Re: NSURLRequest

2009-10-11 Thread Mike Abdullah
On 10 Oct 2009, at 15:36, DKJ wrote: I've got an NSArray that I initialise with data from a plist stored on a remote webserver. I've been doing it like this: NSURL *url = [NSURL URLWithString:@"http://www.server.com/ data.plist"]; NSArray *myArray = [NSArray arrayWithContentsOfURL

Re: NSURLRequest

2009-10-10 Thread Ricky Sharp
On Oct 10, 2009, at 9:36 AM, DKJ wrote: I've got an NSArray that I initialise with data from a plist stored on a remote webserver. I've been doing it like this: NSURL *url = [NSURL URLWithString:@"http://www.server.com/ data.plist"]; NSArray *myArray = [NSArray arrayWithContentsOf

Re: NSURLRequest

2009-10-10 Thread Michael Dautermann
On Oct 10, 2009, at 7:36 AM, DKJ wrote: I've got an NSArray that I initialise with data from a plist stored on a remote webserver. I've been doing it like this: NSURL *url = [NSURL URLWithString:@"http://www.server.com/ data.plist"]; NSArray *myArray = [NSArray arrayWithContentsOf

Re: NSURLRequest- setHTTPMethod to REPORT

2009-05-29 Thread Jason Foreman
On Fri, May 29, 2009 at 4:10 PM, Chris Purcell wrote: > Hello, > > I'm trying to issue a "REPORT" request to a server, the HTTP Method header > needs to look like this: > > REPORT /bernard/work/ HTTP/1.1 > > So I use setHTTPMethod to set the HTTP Method: [theRequest > setHTTPMethod:@"REPORT /berna

Re: NSURLRequest conditional GET

2008-06-19 Thread Marc Monguio
below... On Jun 19, 2008, at 6:13 PM, Jens Alfke wrote: On 18 Jun '08, at 3:01 AM, Marc Monguio wrote: The documentation I've found about "Conditional GET" in the web says I should be sending "If-Modified-Since" and "If-None-Match" headers with the contents of "Last-Modified" and ETag" he

Re: NSURLRequest conditional GET

2008-06-19 Thread Jens Alfke
On 18 Jun '08, at 3:01 AM, Marc Monguio wrote: The documentation I've found about "Conditional GET" in the web says I should be sending "If-Modified-Since" and "If-None-Match" headers with the contents of "Last-Modified" and ETag" headers from the last server's answer. However it doesn't l

Re: NSURLRequest : Unable to Quit App after Syn call to Server.

2008-05-17 Thread Dominik Pich
// --- // 4) Convert Synchronous Data into Human-Readable String (Unicode 8) format: NSString *serverDataString = [[[NSString alloc] initWithData:serverData encoding:NSUTF8StringEncoding] retain]; This is an extra retain. [[soapResponse layoutManager

Re: NSURLRequest : Unable to Quit App after Syn call to Server.

2008-05-17 Thread Frederick C. Lee
Thanks for the editing. Your help is deeply appreciated! Ric. On May 16, 2008, at 10:53 AM, stephen joseph butler wrote: Your code is crashing because you have numerous pointer and memory management issues. On Thu, May 15, 2008 at 4:21 PM, <[EMAIL PROTECTED]> wrote: - (IBAction)startSOAP:(id)

Re: NSURLRequest : Unable to Quit App after Syn call to Server.

2008-05-16 Thread stephen joseph butler
Your code is crashing because you have numerous pointer and memory management issues. On Thu, May 15, 2008 at 4:21 PM, <[EMAIL PROTECTED]> wrote: > - (IBAction)startSOAP:(id)sender { >NSError **myError; NSError *myError; >NSHTTPURLResponse **serverResponse; NSHTTPURLResponse *serverResp

Re: NSURLRequest : Unable to Quit App after Syn call to Server. SOLVED???

2008-05-16 Thread fclee
I needed to modify the default 'GET' Response of the NSURLRequest to a 'POST'... So I changed 'NSURLRequest' to a 'NSMutableURLRequest' to modify the HTTPMethod: // --- // 2) Create the request. NSMutableURLRequest *theRequest=[NSMutableURLRequest reques

Re: NSURLRequest : Unable to Quit App after Syn call to Server.

2008-05-16 Thread fclee
On 05/15/2008 17:56 Jens Alfke wrote .. "...You should call [NSApp terminate: self] instead. " I did that; and repeated it. I'm running in debug mode. The program "works" till I QUIT via [NSApp terminate:self]. Now I'm getting (via gdb console {Running as a Cocoa App on my MacBookPro): Runni

Re: NSURLRequest : Unable to Quit App after Syn call to Server.

2008-05-15 Thread Jens Alfke
On 15 May '08, at 2:21 PM, [EMAIL PROTECTED] wrote: The Cocoa code below "works". I get data back from the server. However, I'm unable to QUIT this application after this particular routine passes through. I checked the Activity Monitor and can see a bunch of threads still in session