SSL Failure on GET request with Groovy HttpBuilder -
i can not make request on following link using groovy's httpbuilder: https://system.planassist.mpu.mp.br/production/login.aspx
i tested method below:
ignoresslissues()
but exception 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 @ sun.security.ssl.alerts.getsslexception(alerts.java:192) @ sun.security.ssl.alerts.getsslexception(alerts.java:154) @ sun.security.ssl.sslsocketimpl.recvalert(sslsocketimpl.java:1979) @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:1086) @ sun.security.ssl.sslsocketimpl.performinitialhandshake(sslsocketimpl.java:1332) @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1359) @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1343) @ org.apache.http.conn.ssl.sslsocketfactory.connectsocket(sslsocketfactory.java:553) @ org.apache.http.conn.ssl.sslsocketfactory.connectsocket(sslsocketfactory.java:412) @ org.apache.http.impl.conn.defaultclientconnectionoperator.openconnection(defaultclientconnectionoperator.java:179) @ org.apache.http.impl.conn.managedclientconnectionimpl.open(managedclientconnectionimpl.java:328) @ org.apache.http.impl.client.defaultrequestdirector.tryconnect(defaultrequestdirector.java:612) @ org.apache.http.impl.client.defaultrequestdirector.execute(defaultrequestdirector.java:447) @ org.apache.http.impl.client.abstracthttpclient.doexecute(abstracthttpclient.java:884) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:71) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:220) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:164) @ groovyx.net.http.httpbuilder.dorequest(httpbuilder.java:515) @ groovyx.net.http.httpbuilder.dorequest(httpbuilder.java:434) @ groovyx.net.http.httpbuilder.request(httpbuilder.java:366) @ groovyx.net.http.httpbuilder$request.call(unknown source) @ org.codehaus.groovy.runtime.callsite.callsitearray.defaultcall(callsitearray.java:45) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:108) @ 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 -> }
Comments
Post a Comment