我正在阅读Apache2.2的源代码,并且发现当我使用prefork模块时,它会调用ap_process_connection
来处理连接,并在此方法中调用ap_run_pre_connection
。
说到这里,我找不到ap_run_pre_connection
和pre_connection
(我找到一个名为AP_DECLARE_HOOK的宏,它在名称pre_connection
之前链接了ap
和_hook_
)。
我在哪里可以找到下一步?Apache httpd源代码中的函数ap_run_pre_connection在哪里?
1
A
回答
2
您可以通过查找ap_hook_pre_connection找到参与此挂钩的模块。
AP_IMPLEMENT_HOOK_RUN_ALL(INT,pre_connection,(conn_rec * C,void *的CSD),(C,CSD),OK,DECLINED)
AP_IMPLEMENT_HOOK_RUN_ALL意味着多个模块调用ap_hook_pre_connection()将被运行,直到一个错误是返回
/**
* Implement an Apache core hook that runs until one of the functions
* returns something other than ok or decline. That return value is
* then returned from the hook runner. If the hooks run to completion,
* then ok is returned. Note that if no hook runs it would probably be
* more correct to return decline, but this currently does not do
* so. The implementation is called ap_run_<i>name</i>.
ap_run_pre_connection的实际impl只是一个通过注册函数的链表进行循环的宏。请参阅apr_hooks.h
相关问题
- 1. Apache Ignite 2.x源代码在哪里?
- 2. jQuery源代码中的width()函数在哪里?
- 3. iText源代码在哪里?
- 4. libOAuth.a源代码在哪里?
- 5. 在android源代码中定义了以下函数在哪里?
- 6. python链中的源代码在哪里?
- 7. Django源代码中的Model.py在哪里?
- 8. `form_widget()`Twig函数的代码在哪里?
- 9. 我在哪里可以找到itertools.combinations()函数的源代码
- 10. Apache Ant“应用”任务的源代码在哪里?
- 11. Linux的usb_storage的源代码在哪里
- 12. 我在哪里可以找到JavaScript本机函数源代码?
- 13. 哪里是Tensorflow中adadelta的源代码?
- 14. GNU C库的源代码在哪里?
- 15. RippleDrawable的源代码在哪里? (Android L)
- 16. Python itertools.islice的源代码在哪里?
- 17. Android adb的Windows源代码在哪里?
- 18. NInject.Framework.Web的源代码在哪里?
- 19. AutoScriptWriter的源代码在哪里
- 20. Html.TextBox的源代码在哪里
- 21. Python鸡蛋的源代码在哪里?
- 22. ghc-prim的源代码在哪里?
- 23. isnan的源代码在哪里?
- 24. F#3.1.2的源代码在哪里?
- 25. nvelocity的最新源代码在哪里
- 26. jar程序的源代码在哪里?
- 27. 目前,JUnit的源代码在哪里?
- 28. IEnumerator的源代码在哪里?
- 29. maven-properties-plugin的源代码在哪里?
- 30. /usr/bin/lock的源代码在哪里?
非常感谢。 – bixiaopeng