Mi viene visualizzato questo errore "HTTPS hostname errato:" durante il tentativo di connessione a un server tramite https. Il mio URL simile a questaNome host HTTPS errato: dovrebbe essere <sub.domain.com>. Che cosa causa questo?
https://sub.domain.com/tamnode/webapps/app/servlet.
ho connettersi utilizzando il seguente codice
// Create a URLConnection object for a URL
URL url = new URL(requestedURL);
HttpURLConnection.setFollowRedirects(false);
// connect
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("User-Agent", USER_AGENT); //$NON-NLS-1$
OutputStreamWriter wr = new OutputStreamWriter(connection
.getOutputStream());
ma poi un errore
IOException: HTTPS hostname wrong: should be <sub.domain.com>.
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing
....
Questo è il codice che ha lavorato in passato, ma non è più . Ci sono state alcune modifiche all'architettura del sistema, ma ho bisogno di ottenere più dati prima di avvicinarmi ai responsabili.
Cosa può causare questo errore? Posso disattivare il controllo URLSpoofing?
I 2 collegamenti oracolo sono interrotti –
@ stuart-siegler: grazie per l'avviso. – vkraemer
Nomehost Il trucco del destinatario ha funzionato per me – nilesh