简体   繁体   中英

Java Https default retry mechanism

Is there a default retry when using sun HttpsUrlConnection ? If so, how can I cancel it ?

If I remeber correctly, the Sun VM, up to Java 1.4, attempted to retry HTTP/HTTPS requests once if the first request failed with some specific error conditions. Since Java 5, this is not done anymore.

It was not possible to disable this behaviour in Java 1.4, so if you're stuck with an old Java VM and cannot accept this behaviour, you have to use a 3rd party HTTP library, like HTTPClient from Apache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM