当HTTP 1.1 KeepAlive为true的时候。HttpUrlConnection 会在socket timeout 时候,重发请求。这样会导致服务器的接受到两次请求,带来一些问题。
android端解决办法:
System.setProperty("http.keepAlive", "false");
当HTTP 1.1 KeepAlive为true的时候。HttpUrlConnection 会在socket timeout 时候,重发请求。这样会导致服务器的接受到两次请求,带来一些问题。
android端解决办法:
System.setProperty("http.keepAlive", "false");
转载于:https://my.oschina.net/u/2306062/blog/367306