xinu, yslow
曾经在哪看到的xinu忘了,今天找的时候开发者居然不提供服务了,不过提供了源码下载,所以在本站放了一个。链接是xinu,很不错的一个站点各项数据分析搜索引擎数据采集工具,唉,偶的网站数据小的可怜啊~~
xinu的源代码,php的
再来说说YSlow,分析你的网页为何加载的这么慢的一个工具,地址回头再给。
会针对你的网页比如css的放置,js的放置等等各项打分,给出改进速度的建议,不过我不明白为何不欢迎ETag……
曾经在哪看到的xinu忘了,今天找的时候开发者居然不提供服务了,不过提供了源码下载,所以在本站放了一个。链接是xinu,很不错的一个站点各项数据分析搜索引擎数据采集工具,唉,偶的网站数据小的可怜啊~~
xinu的源代码,php的
再来说说YSlow,分析你的网页为何加载的这么慢的一个工具,地址回头再给。
会针对你的网页比如css的放置,js的放置等等各项打分,给出改进速度的建议,不过我不明白为何不欢迎ETag……
有三个地方要改
一共使用三个函数
对于我们要读取post的数据,只能取后面两个,而chunked则是对长连接的选项了,使用哪个视情况而定。
另外,gdb httpd pid可以attach一个正在运行的httpd来调试。
在写apache模块的时候,会用到module这个结构体。module这个结构体实际上是module_struct,后面附上了定义。使用的时候通常都是定义一个这个结构体的变量并赋初值,如:
module AP_MODULE_DECLARE_DATA proxy_module =
{
STANDARD20_MODULE_STUFF,
create_proxy_dir_config, /* create per-directory config structure */
merge_proxy_dir_config, /* merge per-directory config structures */
create_proxy_config, /* create per-server config structure */
merge_proxy_config, /* merge per-server config structures */
proxy_cmds, /* command table */
register_hooks
};
其中STANDARD20_MODULE_STUFF这个宏为module_struct中的API version, minor version, module index, name, danamic load handle, next, magic, rewrite_args赋了初值。随后是per-directory configuration structure的初始化、合并函数和per-server configuration structure的初始化、合并函数。command table是command_rec结构的一个数组,依然是宏展开,描述这个模块在配置文件里面的信息。最后的register_hooks指向用于注册hook的函数。
typedef struct module_struct module;
/**
* Module structures. Just about everything is dispatched through
* these, directly or indirectly (through the command and handler
* tables).
*/
struct module_struct {
/** API version, *not* module version; check that module is
* compatible with this version of the server.
*/
int version;
/** API minor version. Provides API feature milestones. Not checked
* during module init */
int minor_version;
/** Index to this modules structures in config vectors. */
int module_index;
/** The name of the module's C file */
const char *name;
/** The handle for the DSO. Internal use only */
void *dynamic_load_handle;
/** A pointer to the next module in the list
* @defvar module_struct *next */
struct module_struct *next;
/** Magic Cookie to identify a module structure; It's mainly
* important for the DSO facility (see also mod_so). */
unsigned long magic;
/** Function to allow MPMs to re-write command line arguments. This
* hook is only available to MPMs.
* @param The process that the server is running in.
*/
void (*rewrite_args) (process_rec *process);
/** Function to allow all modules to create per directory configuration
* structures.
* @param p The pool to use for all allocations.
* @param dir The directory currently being processed.
* @return The per-directory structure created
*/
void *(*create_dir_config) (apr_pool_t *p, char *dir);
/** Function to allow all modules to merge the per directory configuration
* structures for two directories.
* @param p The pool to use for all allocations.
* @param base_conf The directory structure created for the parent directory.
* @param new_conf The directory structure currently being processed.
* @return The new per-directory structure created
*/
void *(*merge_dir_config) (apr_pool_t *p, void *base_conf, void *new_conf);
/** Function to allow all modules to create per server configuration
* structures.
* @param p The pool to use for all allocations.
* @param s The server currently being processed.
* @return The per-server structure created
*/
void *(*create_server_config) (apr_pool_t *p, server_rec *s);
/** Function to allow all modules to merge the per server configuration
* structures for two servers.
* @param p The pool to use for all allocations.
* @param base_conf The directory structure created for the parent directory.
* @param new_conf The directory structure currently being processed.
* @return The new per-directory structure created
*/
void *(*merge_server_config) (apr_pool_t *p, void *base_conf, void *new_conf);
/** A command_rec table that describes all of the directives this module
* defines. */
const command_rec *cmds;
/** A hook to allow modules to hook other points in the request processing.
* In this function, modules should call the ap_hook_*() functions to
* register an interest in a specific step in processing the current
* request.
* @param p the pool to use for all allocations
*/
void (*register_hooks) (apr_pool_t *p);
};
From http://fanqiang.chinaunix.net/app/web/2006-02-21/4009.shtml,作者:张中庆。