doupu1957 2018-12-06 08:27
浏览 32

一个简单的PHP脚本不会一直返回相同大小的答案

I have a simple "what's my ip" running. It gets called by ajax every 5 seconds.

The php is simply <?php echo $_SERVER['REMOTE_ADDR'];?>

But, looking in the apache server log at requests from the same client, same browser, a table of the size of the frequencies vs the size of requests, shows the output size is not consistent.

I do not use cookies on that site.

467 417
164 570
140 385
 40 538
 15 4205
  4 4173
  1 600
  1 5834
  1 559
  1 530
  1 2002

How can the size vary? Same question, same answer, I would assume.

... Edit:

When I do curl -i, I get this; size 330. But the size transferred as shown in log is consistently 3956 bytes?!?

The server is on https; so some certificate exchange is being done, still it should be the same?

HTTP/1.1 200 OK
Date: Thu, 06 Dec 2018 08:46:21 GMT
Server: Apache/2.4.25 (Debian) SVN/1.9.5 PHP/5.6.30-0+deb8u1 mod_python/3.3.1 Python/2.7.13 OpenSSL/1.0.2l mod_perl/2.0.10 Perl/v5.24.1
X-Powered-By: PHP/5.6.30-0+deb8u1
Access-Control-Allow-Origin: *
Content-Length: 10
Content-Type: text/html; charset=UTF-8
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 Unity接入微信SDK 无法开启摄像头
    • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
    • ¥20 cad图纸,chx-3六轴码垛机器人
    • ¥15 移动摄像头专网需要解vlan
    • ¥20 access多表提取相同字段数据并合并
    • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
    • ¥20 Java-Oj-桌布的计算
    • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
    • ¥20 有人知道这种图怎么画吗?
    • ¥15 pyqt6如何引用qrc文件加载里面的的资源