Page 130 - HTTP权威指南
P. 130

服务器不认识Proxy-Connection首部,将其忽略。没有建立keep-alive连接。
                       (a) Proxy-Connection: Keep-Alive  (b) Proxy-Connection: Keep-Alive


                                                       哑代理
                             čdĎ没有Connection首部          čcĎ没有Connection首部
                     客户端                                                   服务器
                                 哑代理转发了Proxy-Connection首部,服务器将其忽略。

                                 代理识别出了Proxy-Connection首部,同意与客户端进
                                 行keep-alive对话,可能还会(可选地)决定与服务器
                                 建立一条keep-alive连接。
                      (e) Proxy-Connection: Keep-Alive  (f )  Connection: Keep-Alive


                                                       聪明的代理
                              (h) Connection: Keep-Alive  (g) Connection:  Keep-Alive
                     客户端                                                   服务器
                                 聪明的代理理解了Proxy-Connection首部,并主动
                                 向服务器发送了一个Connection: Keep-Alive首部。

                 图 4-16 Proxy-Connection 首部修正了单个盲中继带来的问题

                       (a)                 (b)                  (c)
                       Proxy-Connection: Keep-Alive  Proxy-Connection: Keep-Alive  Connection: Keep-Alive


                                              哑代理                聪明的代理
                            (f)               (e)              (d)
                            Connection: Keep-Alive  Connection: Keep-Alive  Connection: Keep-Alive
                     客户端                                                    服务器

                                哑代理无意识地向浏览器和聪明的代理广播Keep-Alive。

                         (g)                  (h)               (i)
                         Proxy-Connection: Keep-Alive  Connection: Keep-Alive  Connection: Keep-Alive


                                              聪明的代理             哑代理
                           člĎ               (k)               (j)
                            Connection: Keep-Alive  Connection: Keep-Alive  Connection: Keep-Alive
                     客户端                                                    服务器

                                哑代理无意识地向聪明的代理和服务器广播Keep-Alive。

                 图 4-17 对有多层次代理的情况,Proxy-Connection 仍然无法解决问题

                                                                             连接管理   |   103
   125   126   127   128   129   130   131   132   133   134   135