zoukankan      html  css  js  c++  java
  • org.apache.http.NoHttpResponseException: XX.XX.XX.XX:80 failed to respond

    解决:

    Finally I fix the issue and it is caused by buffer size. By default, buffer size of httpclient is 8k. So I change it to 4k and my code works well.

    Here is the code that changes buffer size:

     ConnectionConfig connectionConfig = ConnectionConfig.custom()
                    .setBufferSize(4128)
                    .build();
    
     CloseableHttpClient httpclient = HttpClients.custom()
                    .setDefaultConnectionConfig(connectionConfig)
                    .build();

    原贴:https://stackoverflow.com/questions/26111331/org-apache-http-nohttpresponseexception-xx-xx-xx-xx443-failed-to-respond
  • 相关阅读:
    2
    异常处理
    接口
    抽象与多态
    关联关系
    9-13
    数据类型转换
    Day3
    对象和类
    MyEclipse导入现成项目出现小红叉错误
  • 原文地址:https://www.cnblogs.com/bchange/p/9225126.html
Copyright © 2011-2022 走看看