dse3168 2014-10-16 11:49
浏览 642
已采纳

使用https协议失败的ajax请求的可能原因但http有效

Currently I am working on installing https for a site which is based on codeigniter and apache under Linux environment.

I've checked the configuration of my certificates by https://www.digicert.com/help/ and most pages work fine.

But one page that would require three pages from the same site through jQuery ajax request failed to fetch content from these three sources. In chrome console it show following message.

Failed to load resource: net::ERR_CONNECTION_RESET

or

Failed to load resource: net::ERR_CONNECTION_CLOSED

While the same code and page works perfectly with http protocol.

I usually can see content from 1-2 sources at most. But it can not get all of them successfully.

I modified to preform the ajax request again once it fails. But the failed resource would be simply empty content with http status code 200, which means the browser gets the header successfully but failed to fetch content, or the content originally is empty...

So the issue should be caused by apache configuration for https or something relevant to https.

Another strange thing is IE 10 works fine. But failed on Chrome and FireFox.

I've tried to disable apache module reqtimeout. So I don't think it is caused by longer processing time for https protocol.

And it is not an issue about https call http function, they are all https resources.

If anyone can give me some suggestion for further testing or explanation for possible reason? Thanks in advance.

  • 写回答

1条回答 默认 最新

  • duanfu3390 2014-10-30 08:00
    关注

    In my case, it is a server issue.

    I noticed that I only got trouble with failed ajax or iframe requests on Ubuntu 12.10 installed Apache 2.2.

    The exact same code can run on a testing serve which is ubuntu 14.04 installed Apache 2.4. So that took me some day to transfer all data and service to a new server to fix the problem.

    Since we need the server to run and minimize the cost for server. So I didn't spend a lot of time to figure out what was the reason for the problem.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵