iOS プロジェクトで ASIHTTPRequest を使用して REST サーバー メソッド呼び出しを実行し始めましたが、これまでのところ非常に成功しています。奇妙な断続的な問題が1つだけあります。[ASIHTTPRequest startAsynchronous] を使用すると、非常にまれに次の応答が返されます。
HTTP/0.9 200 OK
これが発生すると、サーバー メソッドが呼び出されません。通常、すべてのメソッド呼び出しは、'HTTP/1.1' で始まる応答を返します。接続を保護するために、GeoTrust/RapidSSL 証明書で HTTPS を使用しています。興味深いことに、プロトコルとして「http」を指定して SSL ポート (443) に接続しようとすると、同じ「HTTP/0.9 200 OK」応答が返されることがわかりました。
さらに情報を追加するだけです-問題は主に、アプリが一定期間アイドル状態になった後に発生します。たとえば、リクエストが正常に完了し、アプリをしばらくアイドル状態のままにしておくと、次のリクエストで問題が発生し、アプリは正常に動作し続けます。
何が起こっているのか、誰かに光を当てることができますか?
どうもありがとう、ジョナサン
更新: 問題が発生したときに ASIHTTPRequest によって出力されたデバッグ情報を下に貼り付けました。
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 <ASIHTTPRequest: 0x88a1e00> finished downloading data (0 bytes)
2012-07-12 09:35:49.529 mytestapp[3038:18f07] [STATUS] Request <ASIHTTPRequest: 0x88a1e00> received response headers
2012-07-12 09:35:49.530 mytestapp[3038:18f07] [AUTH] Request <ASIHTTPRequest: 0x88a1e00> 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: <ASIHTTPRequest: 0x88a1e00>
2012-07-12 09:35:49.531 mytestapp[3038:15803] responseHeaders={
}
2012-07-12 09:35:49.531 mytestapp[3038:18f07] [STATUS] Request cancelled: <ASIHTTPRequest: 0x88a1e00>
2012-07-12 09:35:49.532 mytestapp[3038:18f07] [STATUS] Request cancelled: <ASIHTTPRequest: 0x88a0200>
2012-07-12 09:35:49.532 mytestapp[3038:18f07] [STATUS] Request <ASIHTTPRequest: 0x88a0200>: 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: <ASIHTTPRequest: 0x88a0a00>
2012-07-12 09:35:49.533 mytestapp[3038:18f07] [STATUS] Request <ASIHTTPRequest: 0x88a0a00>: Cancelled
2012-07-12 09:35:49.533 mytestapp[3038:18f07] [CONNECTION] Request #40 failed and will invalidate connection #17