SSL Failure on GET request with Groovy HttpBuilder

Uncategorized
Question: I can not make a GET request on the following link using Groovy's HttpBuilder: https://system.planassist.mpu.mp.br/production/login.aspx I already tested the method below:ignoreSSLIssues() But the exception always returns:Error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure Code example:import groovyx.net.http.HTTPBuilder import groovyx.net.http.Method def http = new HTTPBuilder("https://sistema.planassiste.mpu.mp.br/producao/login.aspx") http.ignoreSSLIssues() http.request(Method.GET) { req -> } Result:javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:553) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:412) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:179) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:328) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:612) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:884) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:515) at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:434) at groovyx.net.http.HTTPBuilder.request(HTTPBuilder.java:366) at groovyx.net.http.HTTPBuilder$request.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) WORKS: import groovyx.net.http.HTTPBuilder import groovyx.net.http.Method import org.apache.http.impl.client.HttpClients def http = new HTTPBuilder("https://sistema.planassiste.mpu.mp.br/producao/login.aspx") http.client = HttpClients.createSystem() http.request(Method.GET) { req -> } Answer: Read more
Read More

How to determine if CKSubscription is indexed?

Uncategorized
Question: According to Apple doc, "Subscription objects do not become active until you save them to the server and the server has time to index them.". This "server has time to index them" part is disturbing: how much time, a second, an hour? And more importantly, is there a documented way to find out if CKSubscription (either CKQuerySubscription or CKRecordZoneSubscription) is already indexed? Until I know for sure that the subscription is indeed active, I have to resort to polling, which is a waste of user resources. Also, I don't want to miss any relevant changes, not even one. I know that I can fetchAllSubscriptions() on the CKDatabase, but that doesn't tell me if the subscription is indeed "indexed", and up and running. Thanks for your help, Zsolt Answer: Read…
Read More