PHP实现的带超时功能get(2)


Array
(
    [0]=>HTTP/1.0302Found
    [Accept-Ranges]=>bytes
    [Cache-Control]=>max-age=300
    [Content-Type]=>Array
        (
            [0]=>text/html;charset=utf-8
            [1]=>text/html;charset=utf-8
        )
 
    [Date]=>Array
        (
            [0]=>Fri,12Dec201415:35:40GMT
            [1]=>Fri,12Dec201415:35:43GMT
        )
 
    [Expires]=>Fri,12Dec201415:40:40GMT
    [Last-Modified]=>Wed,11Jan198408:00:00GMT
    [Link]=><[省略...]?s=42&d=http%3A%2F%2F[省略...]&r=G>;
    [Location]=>[省略...]
    [Server]=>Array
        (
            [0]=>ECS(oxr/838B)
            [1]=>nginx
        )
 
    [Source-Age]=>85
    [Via]=>1.1varnish
    [X-Cache]=>302-HIT
    [X-Varnish]=>14702550881470006304
    [Content-Length]=>0
    [Connection]=>Array
        (
            [0]=>close
            [1]=>close
        )
 
    [1]=>HTTP/1.1504Gateway Timeout
)

轮子版返回(瞬间返回,两者内容略有不同,你仔细看就能发现一些有趣的地方了):

复制代码 代码如下:


Array
(
    [0]=>HTTP/1.1302Found
    [Accept-Ranges]=>bytes
    [Via]=>1.1varnish
    [Cache-Control]=>max-age=300
    [Server]=>ECS(oxr/838B)
    [Content-Type]=>text/html;charset=utf-8
    [X-Varnish]=>14702550881470006304
    [Date]=>Fri,12Dec201420:31:02GMT
    [Location]=>[省略...]
    [Expires]=>Fri,12Dec201420:36:02GMT
    [Source-Age]=>85
    [Last-Modified]=>Wed,11Jan198408:00:00GMT
    [X-Cache]=>302-HIT
    [Link]=><[省略...]?s=42&d=http%3A%2F%2F[省略...]&r=G>;
    [Content-Length]=>0
)

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6baf02beee2fd318baeb9dda0fd0cf11.html