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 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)