HttpsUrlConnection and keep-alive

后端 未结 8 1573
太阳男子
太阳男子 2020-12-08 02:27

I am using com.sun.net.httpserver.HttpsServer in my current project which deals with client-authentification etc.. Currently it only prints out the clients addr

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 03:28

    try to add the following code:

    con.setRequestProperty("Connection", "Keep-Alive");
    con.setRequestProperty("Keep-Alive", "header");
    

提交回复
热议问题