Note that there are some explanatory texts on larger screens.

plurals
  1. POObjective C - HTTP/0.9 response from GET using ASIHTTPRequest
    text
    copied!<p>I've started using ASIHTTPRequest in my iOS project to execute REST server method calls and so far have been very successful with it. I just have one strange intermittent problem. Very occasionally I get the following response from using [ASIHTTPRequest startAsynchronous] :</p> <p>HTTP/0.9 200 OK</p> <p>When this occurs my server method doesn't get called. Normally every method call returns with a response starting 'HTTP/1.1'. I'm using HTTPS with a GeoTrust/RapidSSL certificate to secure the connection. Interestingly I've found that I get the same 'HTTP/0.9 200 OK' response if I try to connect to the SSL port (443) but specifying 'http' as the protocol.</p> <p>Just to add more info - the problem mostly occurs after the app has been left idle for a period of time. E.g. request completes successfully, then leave app idle for a while, then on the next request the problem occurs then app continues to work fine.</p> <p>Can anybody shed some light on what might be occurring?</p> <p>Many thanks, Jonathan</p> <p>UPDATE : I've pasted below some debug information output by ASIHTTPRequest when the problem occurred :</p> <pre><code>2012-07-12 09:35:49.376 mytestapp[3038:18f07] [CONNECTION] Closing connection #13 because it has expired 2012-07-12 09:35:49.377 mytestapp[3038:18f07] [CONNECTION] Closing connection #14 because it has expired 2012-07-12 09:35:49.378 mytestapp[3038:18f07] [CONNECTION] Closing connection #15 because it has expired 2012-07-12 09:35:49.380 mytestapp[3038:18f07] [CONNECTION] Request #39 will use connection #16 2012-07-12 09:35:49.381 mytestapp[3038:18f07] [CONNECTION] Request #40 will use connection #17 2012-07-12 09:35:49.382 mytestapp[3038:18f07] [CONNECTION] Request #41 will use connection #18 2012-07-12 09:35:49.529 mytestapp[3038:18f07] [STATUS] Request &lt;ASIHTTPRequest: 0x88a1e00&gt; finished downloading data (0 bytes) 2012-07-12 09:35:49.529 mytestapp[3038:18f07] [STATUS] Request &lt;ASIHTTPRequest: 0x88a1e00&gt; received response headers 2012-07-12 09:35:49.530 mytestapp[3038:18f07] [AUTH] Request &lt;ASIHTTPRequest: 0x88a1e00&gt; has passed Basic authentication 2012-07-12 09:35:49.530 mytestapp[3038:18f07] [CONNECTION] Got no keep-alive header, will keep this connection open for 60.000000 seconds 2012-07-12 09:35:49.530 mytestapp[3038:18f07] [CONNECTION] Request #41 finished using connection #18 2012-07-12 09:35:49.531 mytestapp[3038:18f07] [STATUS] Request finished: &lt;ASIHTTPRequest: 0x88a1e00&gt; 2012-07-12 09:35:49.531 mytestapp[3038:15803] responseHeaders={ } 2012-07-12 09:35:49.531 mytestapp[3038:18f07] [STATUS] Request cancelled: &lt;ASIHTTPRequest: 0x88a1e00&gt; 2012-07-12 09:35:49.532 mytestapp[3038:18f07] [STATUS] Request cancelled: &lt;ASIHTTPRequest: 0x88a0200&gt; 2012-07-12 09:35:49.532 mytestapp[3038:18f07] [STATUS] Request &lt;ASIHTTPRequest: 0x88a0200&gt;: Cancelled 2012-07-12 09:35:49.532 mytestapp[3038:18f07] [CONNECTION] Request #39 failed and will invalidate connection #16 2012-07-12 09:35:49.533 mytestapp[3038:18f07] [STATUS] Request cancelled: &lt;ASIHTTPRequest: 0x88a0a00&gt; 2012-07-12 09:35:49.533 mytestapp[3038:18f07] [STATUS] Request &lt;ASIHTTPRequest: 0x88a0a00&gt;: Cancelled 2012-07-12 09:35:49.533 mytestapp[3038:18f07] [CONNECTION] Request #40 failed and will invalidate connection #17 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload