squid的处理request和reply的流程

request处理:

Breakpoint 6, SQUID_MD5Final (
    digest=0x764d00 "\021dZcaFe\270\273a\020,\304j\222\347\227\372\364\206%B\245#\203\352\275It\357\266\343\003I\322`\225\250\370\204<k?I\275\353O9", ctx=0x7fff24ec0e80) at md5.c:131
131    {
(gdb) bt
#0  SQUID_MD5Final (
    digest=0x764d00 "\021dZcaFe\270\273a\020,\304j\222\347\227\372\364\206%B\245#\203\352\275It\357\266\343\003I\322`\225\250\370\204<k?I\275\353O9", ctx=0x7fff24ec0e80) at md5.c:131
#1  0x0000000000489e35 in storeKeyPublicByRequestMethod (request=0x1d544a0, method=1) at store_key_md5.c:158
#2  0x00000000004809c7 in storeGetPublicByRequestMethod (req=0x1d544a0, method=1) at store.c:371
#3  0x00000000004809f1 in storeGetPublicByRequest (req=0x1d544a0) at store.c:377
#4  0x0000000000428c1b in clientProcessRequest2 (http=0x1d54058) at client_side.c:3387
#5  0x00000000004293aa in clientProcessRequest (http=0x1d54058) at client_side.c:3538
#6  0x000000000042026b in clientCheckNoCacheDone (answer=1, data=0x1d54058) at client_side.c:595
#7  0x000000000040af87 in aclCheckCallback (checklist=0x1d66718, answer=ACCESS_ALLOWED) at acl.c:2297
#8  0x000000000040ad7e in aclCheck (checklist=0x1d66718) at acl.c:2254
#9  0x000000000040b3db in aclNBCheck (checklist=0x1d66718, callback=0x420211 <clientCheckNoCacheDone>,
    callback_data=0x1d54058) at acl.c:2450
#10 0x00000000004201e7 in clientCheckNoCache (http=0x1d54058) at client_side.c:583
#11 0x000000000041f8dd in clientAccessCheck2 (data=0x1d54058) at client_side.c:395
#12 0x000000000041fa65 in clientFinishRewriteStuff (http=0x1d54058) at client_side.c:447
#13 0x000000000042f2ac in clientStoreURLRewriteDone (data=0x1d54058, result=0x0) at client_side_storeurl_rewrite.c:216
#14 0x000000000042f0ef in clientStoreURLRewriteStart (http=0x1d54058) at client_side_storeurl_rewrite.c:178
#15 0x000000000042ec44 in clientRedirectDone (data=0x1d54058, result=0x0) at client_side_rewrite.c:482
#16 0x000000000042e45a in clientRedirectAccessCheckDone (answer=0, data=0x1d54058) at client_side_rewrite.c:361
#17 0x000000000040af87 in aclCheckCallback (checklist=0x1d54b98, answer=ACCESS_DENIED) at acl.c:2297
#18 0x000000000040ae1e in aclCheck (checklist=0x1d54b98) at acl.c:2266
#19 0x000000000040b3db in aclNBCheck (checklist=0x1d54b98, callback=0x42e246 <clientRedirectAccessCheckDone>,
---Type <return> to continue, or q <return> to quit---
    callback_data=0x1d54058) at acl.c:2450
#20 0x000000000042e51f in clientRedirectStart (http=0x1d54058) at client_side_rewrite.c:374
#21 0x000000000041fbe5 in clientAccessCheckDone (answer=1, data=0x1d54058) at client_side.c:470
#22 0x000000000040af87 in aclCheckCallback (checklist=0x1d54a18, answer=ACCESS_ALLOWED) at acl.c:2297
#23 0x000000000040ad7e in aclCheck (checklist=0x1d54a18) at acl.c:2254
#24 0x000000000040b3db in aclNBCheck (checklist=0x1d54a18, callback=0x41fa67 <clientAccessCheckDone>,
    callback_data=0x1d54058) at acl.c:2450
#25 0x000000000041f862 in clientAccessCheck (data=0x1d54058) at client_side.c:384
#26 0x000000000041f80f in clientCheckFollowXForwardedFor (data=0x1d54058) at client_side.c:376
#27 0x000000000042b7aa in clientTryParseRequest (conn=0x1d52d98) at client_side.c:4103
#28 0x000000000042bd75 in clientReadRequest (fd=12, data=0x1d52d98) at client_side.c:4221
#29 0x0000000000432bd9 in comm_call_handlers (fd=12, read_event=1, write_event=0) at comm_generic.c:264
#30 0x00000000004334de in do_comm_select (msec=735) at comm_epoll.c:195
#31 0x0000000000432fc3 in comm_select (msec=735) at comm_generic.c:390
#32 0x0000000000466c9a in main (argc=2, argv=0x7fff24ec1fd8) at main.c:863
(gdb) bt
#0  SQUID_MD5Final (digest=0x764d20 "", ctx=0x7fff811cd960) at md5.c:131
#1  0x0000000000489c02 in storeKeyPrivate (url=0x1cad320 "http://127.0.0.1:70/hello", method=1, id=1)
    at store_key_md5.c:106
#2  0x0000000000480b00 in storeSetPrivateKey (e=0x1cad3e0) at store.c:407
#3  0x000000000048340c in storeCreateEntry (url=0x1cad290 "http://127.0.0.1:70/hello", flags=..., method=1)
    at store.c:1097
#4  0x0000000000420b06 in clientProcessExpired (http=0x1c830f8) at client_side.c:751
#5  0x000000000042085b in clientRefreshCheckDone (data=0x1c830f8, fresh=0, log=0x0) at client_side.c:707
#6  0x00000000004765e7 in refreshCheckSubmit (entry=0x1c81d80, callback=0x4207d0 <clientRefreshCheckDone>,
    callback_data=0x1c830f8) at refresh_check.c:451
#7  0x00000000004207ce in clientRefreshCheck (http=0x1c830f8) at client_side.c:693
#8  0x00000000004262a9 in clientCacheHit (data=0x1c830f8, rep=0x1cabb10) at client_side.c:2453
#9  0x000000000041f6b0 in storeClientCopyHeadersCB (data=0x1c830f8, buf=0x1c9e1b0 "", size=272) at client_side.c:185
#10 0x0000000000486af5 in storeClientCallback (sc=0x1c9e138, sz=272) at store_client.c:146
#11 0x0000000000487bd2 in storeClientReadHeader (data=0x1c9e138, buf=0x1c9e1b0 "", len=391) at store_client.c:512
#12 0x000000000049c10c in storeUfsReadDone (fd=<value optimized out>, buf=0x1c9e1b0 "", len=<value optimized out>,
    errflag=0, my_data=0x1c81308) at ufs/store_io_ufs.c:238
#13 0x0000000000434dec in diskHandleRead (fd=16, data=0x1c81380) at disk.c:380
#14 0x0000000000434ec8 in file_read (fd=16, buf=0x1c9e1b0 "", req_len=4096, file_offset=0,
    handler=0x49c050 <storeUfsReadDone>, client_data=0x1c81308) at disk.c:404
#15 0x00000000004865c4 in storeRead (sio=0x1c81308, buf=0x1c9e1b0 "", size=4096, offset=0,
    callback=0x48747a <storeClientReadHeader>, callback_data=0x1c9e138) at store_io.c:103
#16 0x00000000004872c6 in storeClientFileRead (sc=0x1c9e138) at store_client.c:338
---Type <return> to continue, or q <return> to quit---
#17 0x0000000000487202 in storeClientCopy3 (e=0x1c81d80, sc=0x1c9e138) at store_client.c:327
#18 0x0000000000486eab in storeClientCopy2 (e=0x1c81d80, sc=0x1c9e138) at store_client.c:249
#19 0x0000000000486ce2 in storeClientCopy (sc=0x1c9e138, e=0x1c81d80, seen_offset=0, copy_offset=0, size=4096,
    buf=0x1c9e1b0 "", callback=0x41f5c4 <storeClientCopyHeadersCB>, data=0x1c830f8) at store_client.c:198
#20 0x000000000041f73c in storeClientCopyHeaders (sc=0x1c9e138, e=0x1c81d80, callback=0x425520 <clientCacheHit>,
    callback_data=0x1c830f8) at client_side.c:193
#21 0x000000000042953b in clientProcessRequest (http=0x1c830f8) at client_side.c:3556
#22 0x000000000042026b in clientCheckNoCacheDone (answer=1, data=0x1c830f8) at client_side.c:595
#23 0x000000000040af87 in aclCheckCallback (checklist=0x1c95998, answer=ACCESS_ALLOWED) at acl.c:2297
#24 0x000000000040ad7e in aclCheck (checklist=0x1c95998) at acl.c:2254
#25 0x000000000040b3db in aclNBCheck (checklist=0x1c95998, callback=0x420211 <clientCheckNoCacheDone>,
    callback_data=0x1c830f8) at acl.c:2450
#26 0x00000000004201e7 in clientCheckNoCache (http=0x1c830f8) at client_side.c:583
#27 0x000000000041f8dd in clientAccessCheck2 (data=0x1c830f8) at client_side.c:395
#28 0x000000000041fa65 in clientFinishRewriteStuff (http=0x1c830f8) at client_side.c:447
#29 0x000000000042f2ac in clientStoreURLRewriteDone (data=0x1c830f8, result=0x0) at client_side_storeurl_rewrite.c:216
#30 0x000000000042f0ef in clientStoreURLRewriteStart (http=0x1c830f8) at client_side_storeurl_rewrite.c:178
#31 0x000000000042ec44 in clientRedirectDone (data=0x1c830f8, result=0x0) at client_side_rewrite.c:482
#32 0x000000000042e45a in clientRedirectAccessCheckDone (answer=0, data=0x1c830f8) at client_side_rewrite.c:361
#33 0x000000000040af87 in aclCheckCallback (checklist=0x1c83d58, answer=ACCESS_DENIED) at acl.c:2297
#34 0x000000000040ae1e in aclCheck (checklist=0x1c83d58) at acl.c:2266
#35 0x000000000040b3db in aclNBCheck (checklist=0x1c83d58, callback=0x42e246 <clientRedirectAccessCheckDone>,
    callback_data=0x1c830f8) at acl.c:2450
---Type <return> to continue, or q <return> to quit---
#36 0x000000000042e51f in clientRedirectStart (http=0x1c830f8) at client_side_rewrite.c:374
#37 0x000000000041fbe5 in clientAccessCheckDone (answer=1, data=0x1c830f8) at client_side.c:470
#38 0x000000000040af87 in aclCheckCallback (checklist=0x1c83ba8, answer=ACCESS_ALLOWED) at acl.c:2297
#39 0x000000000040ad7e in aclCheck (checklist=0x1c83ba8) at acl.c:2254
#40 0x000000000040b3db in aclNBCheck (checklist=0x1c83ba8, callback=0x41fa67 <clientAccessCheckDone>,
    callback_data=0x1c830f8) at acl.c:2450
#41 0x000000000041f862 in clientAccessCheck (data=0x1c830f8) at client_side.c:384
#42 0x000000000041f80f in clientCheckFollowXForwardedFor (data=0x1c830f8) at client_side.c:376
#43 0x000000000042b7aa in clientTryParseRequest (conn=0x1c81e38) at client_side.c:4103
#44 0x000000000042bd75 in clientReadRequest (fd=12, data=0x1c81e38) at client_side.c:4221
#45 0x0000000000432bd9 in comm_call_handlers (fd=12, read_event=1, write_event=0) at comm_generic.c:264
#46 0x00000000004334de in do_comm_select (msec=998) at comm_epoll.c:195
#47 0x0000000000432fc3 in comm_select (msec=998) at comm_generic.c:390
#48 0x0000000000466c9a in main (argc=2, argv=0x7fff811cf088) at main.c:863
(gdb) 

reply报文的处理过程:

(gdb)
#0  SQUID_MD5Final (digest=0x764d20 "\237:\027", ctx=0x7fff811ceb70) at md5.c:131
#1  0x0000000000489c02 in storeKeyPrivate (url=0x1cad2c0 "http://127.0.0.1:70/hello", method=1, id=2)
    at store_key_md5.c:106
#2  0x0000000000480b00 in storeSetPrivateKey (e=0x1c81d80) at store.c:407
#3  0x000000000048329e in storeSetPublicKey (e=0x1cad3e0) at store.c:1070
#4  0x000000000044ef4e in httpMakePublic (entry=0x1cad3e0) at http.c:115
#5  0x00000000004500cd in httpProcessReplyHeader (httpState=0x1cada28,
    buf=0x70cee0 "HTTP/1.0 200 OK\r\nAge: 3000\r\nCache-control: public,max-age=6000\r\nLast-modified: Mon,09 Jun 2014 06:20:32 GMT\r\nExpire: Mon,16 Jun 2014 06:20:32 GMT\r\nEtag: ", ‘x‘ <repeats 16 times>, "\r\nContent-Type: text; charset=I"..., size=272) at http.c:565
#6  0x00000000004515b6 in httpReadReply (fd=17, data=0x1cada28) at http.c:970
#7  0x0000000000432bd9 in comm_call_handlers (fd=17, read_event=1, write_event=0) at comm_generic.c:264
#8  0x00000000004334de in do_comm_select (msec=983) at comm_epoll.c:195
#9  0x0000000000432fc3 in comm_select (msec=983) at comm_generic.c:390
#10 0x0000000000466c9a in main (argc=2, argv=0x7fff811cf088) at main.c:863

squid的处理request和reply的流程

时间: 2024-10-10 01:01:39

squid的处理request和reply的流程的相关文章

[WCF]设置拦截器捕捉到request和reply消息

WCF进阶学习ing... 在熟练掌握了ABC的使用以后,就开始想着去了解WCF是怎么通信的了.首先是服务描述语言wsdl,它定义了服务的描述等等,用于让外界知道这个服务的ABC是什么.另外一个比较重要的就是消息. WCF是通过消息进行通讯的,一般是使用SOAP形式.服务端的信道监听器接收到消息之后,对消息进行反序列化,解码,然后通过激活对象,再去invoke相应的操作,操作的结果(返回值)再通过编码,序列化,传送给调用者,调用者再对消息进行反序列化,解码,最后拿到结果.所以在这个过程中,对消息

13.zookeeper原理解析-服务器端处理流程之处理器详解

===================斩秋|http://blog.csdn.net/quhongwei_zhanqiu=============== 各个processor的主要功能 1) PrepRequestProcessor 如名字这个处理器主要功能是对请求进行预处理, 将client向server请求二进制数据反序列化成sever中请求操作. PrepRequestProcessor做为leader的第一个处理器,它的请求数据来源主要来自: (1)    Leader做一个zk服务接收

Android7.0 Phone应用源码分析(一) phone拨号流程分析

1.1 dialer拨号 拨号盘点击拨号DialpadFragment的onClick方法会被调用 public void onClick(View view) { int resId = view.getId(); if (resId == R.id.dialpad_floating_action_button) { view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); handleDialButtonPressed(

java Graphics2D根据流程xml文件画流程图(完整代码)

1.先来一张效果图 2.java代码 package com.geoway.plan.action; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.geom.GeneralPath; import java.awt.image.Buffered

Squid 反向代理加速网站

本实例的域名是 wenjin.cache.ibm.com.cn,通过DNS的轮询 技术,将客户端的请求分发给其中一台 Squid 反向代理服务器处理,如果这台 Squid 缓存了用户的请求资源,则将请求的资源直接返回给用户,否则这台 Squid 将没有缓存的请求根据配置的规则发送给邻居 Squid 和后台的 WEB 服务器处理,这样既减轻后台 WEB 服务器的负载,又提高整个网站的性能和安全性.该系统结构图 3 如下: 图 3. 系统结构 配置的系统环境: 一台 DNS 服务器:操作系统 Fre

zookeeper原理解析-服务器端处理流程

1)处理器链 这部分内容我们主要讲解zookeeper请求在zookeeper server端的处理流程,对于不同角色的zookeeper具有不同的处理流程, ZookeepeerServer的start方法中会调用setupRequestProcessors()来初始化处理器链,它被子类覆写实现. 1.      LeaderZooKeeperServer 看如上代码主要建立了如下的两个处理器流链 (1)    PrepRequestProcessor(线程) => ProposalReque

010_01Servlet Request&amp;Response

HttpServletRequest对象代表客户端的请求,当客户端通过HTTP协议访问服务器时,HTTP请求头中的所有信息都封装在这个对象中,开发人员通过这个对象的方法,可以获得客户这些信息 HttpServletResponse对象代表服务器的响应.这个对象中封装了向客户端发送数据.发送响应头,发送响应状态码的方法 request常用方法: 获得客户机信息 getRequestURL方法返回客户端发出请求时的完整URL. getRequestURI方法返回请求行中的资源名部分. getQuer

调度 engine._next_request_from_scheduler() 取出request交给handler,结果是request,执行engine.craw(),结果是resp/fail,下一步看scraper.enqueue_scrape()

0.def _next_request_from_scheduler(self, spider): C:\Program Files\Anaconda2\Lib\site-packages\scrapy\core\engine.py def _next_request_from_scheduler(self, spider): slot = self.slot request = slot.scheduler.next_request() #首先从优先级队列取出一个 request if not

Django运行方式及处理流程总结

学了django有一段时间了,也没深入了解过它内部的实现,正好看到一篇介绍django运行原理的,有图有代码,深度好文,值得收藏. -- xxmcf 2015.09.28 22:29 原文链接: 之前在网上看过一些介绍Django处理请求的流程和Django源码结构的文章,觉得了解一下这些内容对开发Django项目还是很有帮助的.所以,我按照自己的逻辑总结了一下Django项目的运行方式和对Request的基本处理流程. 一.Django的运行方式 运行Django项目的方法很多,这里主要介绍一