squid的处理request和reply的流程
request处理:
Breakpoint , 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:
{
(gdb) bt
# 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:
# 0x0000000000489e35 in storeKeyPublicByRequestMethod (request=0x1d544a0, method=) at store_key_md5.c:
# 0x00000000004809c7 in storeGetPublicByRequestMethod (req=0x1d544a0, method=) at store.c:
# 0x00000000004809f1 in storeGetPublicByRequest (req=0x1d544a0) at store.c:
# 0x0000000000428c1b in clientProcessRequest2 (http=0x1d54058) at client_side.c:
# 0x00000000004293aa in clientProcessRequest (http=0x1d54058) at client_side.c:
# 0x000000000042026b in clientCheckNoCacheDone (answer=, data=0x1d54058) at client_side.c:
# 0x000000000040af87 in aclCheckCallback (checklist=0x1d66718, answer=ACCESS_ALLOWED) at acl.c:
# 0x000000000040ad7e in aclCheck (checklist=0x1d66718) at acl.c:
# 0x000000000040b3db in aclNBCheck (checklist=0x1d66718, callback=0x420211 <clientCheckNoCacheDone>,
callback_data=0x1d54058) at acl.c:
# 0x00000000004201e7 in clientCheckNoCache (http=0x1d54058) at client_side.c:
# 0x000000000041f8dd in clientAccessCheck2 (data=0x1d54058) at client_side.c:
# 0x000000000041fa65 in clientFinishRewriteStuff (http=0x1d54058) at client_side.c:
# 0x000000000042f2ac in clientStoreURLRewriteDone (data=0x1d54058, result=0x0) at client_side_storeurl_rewrite.c:
# 0x000000000042f0ef in clientStoreURLRewriteStart (http=0x1d54058) at client_side_storeurl_rewrite.c:
# 0x000000000042ec44 in clientRedirectDone (data=0x1d54058, result=0x0) at client_side_rewrite.c:
# 0x000000000042e45a in clientRedirectAccessCheckDone (answer=, data=0x1d54058) at client_side_rewrite.c:
# 0x000000000040af87 in aclCheckCallback (checklist=0x1d54b98, answer=ACCESS_DENIED) at acl.c:
# 0x000000000040ae1e in aclCheck (checklist=0x1d54b98) at acl.c:
# 0x000000000040b3db in aclNBCheck (checklist=0x1d54b98, callback=0x42e246 <clientRedirectAccessCheckDone>,
---Type <return> to continue, or q <return> to quit---
callback_data=0x1d54058) at acl.c:
# 0x000000000042e51f in clientRedirectStart (http=0x1d54058) at client_side_rewrite.c:
# 0x000000000041fbe5 in clientAccessCheckDone (answer=, data=0x1d54058) at client_side.c:
# 0x000000000040af87 in aclCheckCallback (checklist=0x1d54a18, answer=ACCESS_ALLOWED) at acl.c:
# 0x000000000040ad7e in aclCheck (checklist=0x1d54a18) at acl.c:
# 0x000000000040b3db in aclNBCheck (checklist=0x1d54a18, callback=0x41fa67 <clientAccessCheckDone>,
callback_data=0x1d54058) at acl.c:
# 0x000000000041f862 in clientAccessCheck (data=0x1d54058) at client_side.c:
# 0x000000000041f80f in clientCheckFollowXForwardedFor (data=0x1d54058) at client_side.c:
# 0x000000000042b7aa in clientTryParseRequest (conn=0x1d52d98) at client_side.c:
# 0x000000000042bd75 in clientReadRequest (fd=, data=0x1d52d98) at client_side.c:
# 0x0000000000432bd9 in comm_call_handlers (fd=, read_event=, write_event=) at comm_generic.c:
# 0x00000000004334de in do_comm_select (msec=) at comm_epoll.c:
# 0x0000000000432fc3 in comm_select (msec=) at comm_generic.c:
# 0x0000000000466c9a in main (argc=, argv=0x7fff24ec1fd8) at main.c:
(gdb) bt
# SQUID_MD5Final (digest=0x764d20 "", ctx=0x7fff811cd960) at md5.c:
# 0x0000000000489c02 in storeKeyPrivate (url=0x1cad320 "http://127.0.0.1:70/hello", method=, id=)
at store_key_md5.c:
# 0x0000000000480b00 in storeSetPrivateKey (e=0x1cad3e0) at store.c:
# 0x000000000048340c in storeCreateEntry (url=0x1cad290 "http://127.0.0.1:70/hello", flags=..., method=)
at store.c:
# 0x0000000000420b06 in clientProcessExpired (http=0x1c830f8) at client_side.c:
# 0x000000000042085b in clientRefreshCheckDone (data=0x1c830f8, fresh=, log=0x0) at client_side.c:
# 0x00000000004765e7 in refreshCheckSubmit (entry=0x1c81d80, callback=0x4207d0 <clientRefreshCheckDone>,
callback_data=0x1c830f8) at refresh_check.c:
# 0x00000000004207ce in clientRefreshCheck (http=0x1c830f8) at client_side.c:
# 0x00000000004262a9 in clientCacheHit (data=0x1c830f8, rep=0x1cabb10) at client_side.c:
# 0x000000000041f6b0 in storeClientCopyHeadersCB (data=0x1c830f8, buf=0x1c9e1b0 "", size=) at client_side.c:
# 0x0000000000486af5 in storeClientCallback (sc=0x1c9e138, sz=) at store_client.c:
# 0x0000000000487bd2 in storeClientReadHeader (data=0x1c9e138, buf=0x1c9e1b0 "", len=) at store_client.c:
# 0x000000000049c10c in storeUfsReadDone (fd=<value optimized out>, buf=0x1c9e1b0 "", len=<value optimized out>,
errflag=, my_data=0x1c81308) at ufs/store_io_ufs.c:
# 0x0000000000434dec in diskHandleRead (fd=, data=0x1c81380) at disk.c:
# 0x0000000000434ec8 in file_read (fd=, buf=0x1c9e1b0 "", req_len=, file_offset=,
handler=0x49c050 <storeUfsReadDone>, client_data=0x1c81308) at disk.c:
# 0x00000000004865c4 in storeRead (sio=0x1c81308, buf=0x1c9e1b0 "", size=, offset=,
callback=0x48747a <storeClientReadHeader>, callback_data=0x1c9e138) at store_io.c:
# 0x00000000004872c6 in storeClientFileRead (sc=0x1c9e138) at store_client.c:
---Type <return> to continue, or q <return> to quit---
# 0x0000000000487202 in storeClientCopy3 (e=0x1c81d80, sc=0x1c9e138) at store_client.c:
# 0x0000000000486eab in storeClientCopy2 (e=0x1c81d80, sc=0x1c9e138) at store_client.c:
# 0x0000000000486ce2 in storeClientCopy (sc=0x1c9e138, e=0x1c81d80, seen_offset=, copy_offset=, size=,
buf=0x1c9e1b0 "", callback=0x41f5c4 <storeClientCopyHeadersCB>, data=0x1c830f8) at store_client.c:
# 0x000000000041f73c in storeClientCopyHeaders (sc=0x1c9e138, e=0x1c81d80, callback=0x425520 <clientCacheHit>,
callback_data=0x1c830f8) at client_side.c:
# 0x000000000042953b in clientProcessRequest (http=0x1c830f8) at client_side.c:
# 0x000000000042026b in clientCheckNoCacheDone (answer=, data=0x1c830f8) at client_side.c:
# 0x000000000040af87 in aclCheckCallback (checklist=0x1c95998, answer=ACCESS_ALLOWED) at acl.c:
# 0x000000000040ad7e in aclCheck (checklist=0x1c95998) at acl.c:
# 0x000000000040b3db in aclNBCheck (checklist=0x1c95998, callback=0x420211 <clientCheckNoCacheDone>,
callback_data=0x1c830f8) at acl.c:
# 0x00000000004201e7 in clientCheckNoCache (http=0x1c830f8) at client_side.c:
# 0x000000000041f8dd in clientAccessCheck2 (data=0x1c830f8) at client_side.c:
# 0x000000000041fa65 in clientFinishRewriteStuff (http=0x1c830f8) at client_side.c:
# 0x000000000042f2ac in clientStoreURLRewriteDone (data=0x1c830f8, result=0x0) at client_side_storeurl_rewrite.c:
# 0x000000000042f0ef in clientStoreURLRewriteStart (http=0x1c830f8) at client_side_storeurl_rewrite.c:
# 0x000000000042ec44 in clientRedirectDone (data=0x1c830f8, result=0x0) at client_side_rewrite.c:
# 0x000000000042e45a in clientRedirectAccessCheckDone (answer=, data=0x1c830f8) at client_side_rewrite.c:
# 0x000000000040af87 in aclCheckCallback (checklist=0x1c83d58, answer=ACCESS_DENIED) at acl.c:
# 0x000000000040ae1e in aclCheck (checklist=0x1c83d58) at acl.c:
# 0x000000000040b3db in aclNBCheck (checklist=0x1c83d58, callback=0x42e246 <clientRedirectAccessCheckDone>,
callback_data=0x1c830f8) at acl.c:
---Type <return> to continue, or q <return> to quit---
# 0x000000000042e51f in clientRedirectStart (http=0x1c830f8) at client_side_rewrite.c:
# 0x000000000041fbe5 in clientAccessCheckDone (answer=, data=0x1c830f8) at client_side.c:
# 0x000000000040af87 in aclCheckCallback (checklist=0x1c83ba8, answer=ACCESS_ALLOWED) at acl.c:
# 0x000000000040ad7e in aclCheck (checklist=0x1c83ba8) at acl.c:
# 0x000000000040b3db in aclNBCheck (checklist=0x1c83ba8, callback=0x41fa67 <clientAccessCheckDone>,
callback_data=0x1c830f8) at acl.c:
# 0x000000000041f862 in clientAccessCheck (data=0x1c830f8) at client_side.c:
# 0x000000000041f80f in clientCheckFollowXForwardedFor (data=0x1c830f8) at client_side.c:
# 0x000000000042b7aa in clientTryParseRequest (conn=0x1c81e38) at client_side.c:
# 0x000000000042bd75 in clientReadRequest (fd=, data=0x1c81e38) at client_side.c:
# 0x0000000000432bd9 in comm_call_handlers (fd=, read_event=, write_event=) at comm_generic.c:
# 0x00000000004334de in do_comm_select (msec=) at comm_epoll.c:
# 0x0000000000432fc3 in comm_select (msec=) at comm_generic.c:
# 0x0000000000466c9a in main (argc=, argv=0x7fff811cf088) at main.c:
(gdb)
reply报文的处理过程:
(gdb)
# SQUID_MD5Final (digest=0x764d20 "\237:\027", ctx=0x7fff811ceb70) at md5.c:
# 0x0000000000489c02 in storeKeyPrivate (url=0x1cad2c0 "http://127.0.0.1:70/hello", method=, id=)
at store_key_md5.c:
# 0x0000000000480b00 in storeSetPrivateKey (e=0x1c81d80) at store.c:
# 0x000000000048329e in storeSetPublicKey (e=0x1cad3e0) at store.c:
# 0x000000000044ef4e in httpMakePublic (entry=0x1cad3e0) at http.c:
# 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 times>, "\r\nContent-Type: text; charset=I"..., size=) at http.c:
# 0x00000000004515b6 in httpReadReply (fd=, data=0x1cada28) at http.c:
# 0x0000000000432bd9 in comm_call_handlers (fd=, read_event=, write_event=) at comm_generic.c:
# 0x00000000004334de in do_comm_select (msec=) at comm_epoll.c:
# 0x0000000000432fc3 in comm_select (msec=) at comm_generic.c:
# 0x0000000000466c9a in main (argc=, argv=0x7fff811cf088) at main.c:
squid的处理request和reply的流程的更多相关文章
- Salesforce Integration 概览(二) Remote Process Invocation—Request and Reply(远程进程调用--请求和响应)
本篇参考:https://resources.docs.salesforce.com/sfdc/pdf/integration_patterns_and_practices.pdf 我们在项目中,经常 ...
- [WCF]设置拦截器捕捉到request和reply消息
WCF进阶学习ing... 在熟练掌握了ABC的使用以后,就开始想着去了解WCF是怎么通信的了.首先是服务描述语言wsdl,它定义了服务的描述等等,用于让外界知道这个服务的ABC是什么.另外一个比较重 ...
- 【转】WCF设置拦截器捕捉到request和reply消息
原文:https://www.cnblogs.com/yanglang/p/7063743.html 我们需要拦截消息,并把消息打印出来,那么我们就需要一个拦截器,叫做MessageInspector ...
- github Pull Request合入全流程介绍
图解全流程 详细步骤 1. fork仓库 2. clone fork仓库到本地 3. 关联upstream原仓库 在fork本地仓库输入下面命令进行关联: git remote add upstrea ...
- django的request介绍和APIView流程分析和CBV的流程分析
首先get请求的数据都在request.GET中,request.body中没有,因为只有post请求有请求体,request.body中的数据是请求体的数据 首先,我们还是用cbv的方式来讲解 我们 ...
- squid源码安装下的conf文件默认值和提示
# WELCOME TO SQUID 3.0.STABLE26# ----------------------------## This is the default Squid c ...
- squid ACL 大全
Access Controls in Squid Contents Access Controls in Squid The Basics: How the parts fit together AC ...
- zookeeper原理解析-服务器端处理流程
1)处理器链 这部分内容我们主要讲解zookeeper请求在zookeeper server端的处理流程,对于不同角色的zookeeper具有不同的处理流程, ZookeepeerServer的sta ...
- github的pull request是指什么意思?有什么用处
github的pull request是指什么意思? 来看看某乎某位阿牛的理解,多么的简单粗暴! 我尝试用类比的方法来解释一下 pull reqeust.想想我们中学考试,老师改卷的场景吧.你做的试卷 ...
随机推荐
- Freemarker模板的使用简介
需要的jar包: 在pom.xml文件中贴入 <dependency> <groupId>junit</groupId> <artifactId>jun ...
- 如何将本地的一个新项目上传到GitHub上新建的仓库中去
1:我们需要先创建一个本地的版本库(其实也就是一个文件夹).直接右击新建文件夹,或者右击打开Git bash命令行窗口通过命令mkdir来创建(mkdir 文件名). 进入这个文件夹的根目录,选中目录 ...
- git 查看对比的方法log diff
git shortlog 默认情况下,git shortlog 把输出按作者名字排序,但你可以传入 -n 选项来按每个作者提交数量排序. 1.有冲突时可以用 git status查看 2.通过git ...
- symfony学习笔记——路由
symfony的路由其实就是通过url映射到控制器的一个设置 _test: path: /test/{type}/{page} methods: [GET] defaults: {_con ...
- 53道Java线程面试题
53道Java线程面试题 下面是Java线程相关的热门面试题,你可以用它来好好准备面试. 1) 什么是线程? 线程是操作系统能够进行运算调度的最小单位,它被包含在进程之中,是进程中的实际运作单位.程序 ...
- 使用 gitolite 管理配置 git 库的权限
问题:每次创建git库都需要在gitolite的配置文件中添加git库的配置信息,为了方便管理git库,不在重复提交,所以修改gitolite的配置管理文件. 环境:ubuntu16.04 安装git ...
- 文件I/O编程 (fcntl)
Fcntl函数语法要点所需头文件:#include #include #include函数原型:int fcntl(int fd,cmd,struct flock ...
- java.lang.Integer 类(JDK1.7)
1.Integer 和int 的区别 ①.Integer 是 int 包装类,int 是八大基本数据类型之一(byte,char,short,int,long,float,double,boolean ...
- mysql5.7.26做主从复制配置
一.首先两台服务器安装好mysql数据库环境 参照linux rpm方式安装mysql5.1 https://www.cnblogs.com/sky-cheng/p/10564604.html 二.主 ...
- C#文件路径操作总结
一.获取当前文件的路径 1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName 获取模块的完整路径,包括 ...