5 messages in ru.sysoev.nginxRe: [dev] change in ngx_conf_merge_pt...
FromSent OnAttachments
Manlio PerilloNov 24, 2007 9:25 am 
Igor SysoevNov 24, 2007 9:43 am 
Manlio PerilloNov 24, 2007 10:29 am 
Manlio PerilloNov 25, 2007 9:20 am 
Manlio PerilloNov 25, 2007 9:48 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [dev] change in ngx_conf_merge_ptr_value for 0.5.33Actions...
From:Manlio Perillo (manl@public.gmane.org)
Date:Nov 25, 2007 9:48:08 am
List:ru.sysoev.nginx

Manlio Perillo ha scritto:

[...]

In ngx_http_wsgi_create_loc_conf I set: wlcf->callable_object = NGX_CONF_UNSET_PTR;

and in ngx_http_wsgi_merge_loc_conf: ngx_conf_merge_ptr_value(conf->callable_object, prev->callable_object, "application");

When directive wsgi_callable_object is not defined, then it defaults to "application".

However if I define the directive in configuration file: location / { wsgi_alias /usr/local/nginx/nginx-simple.py; wsgi_callable_object application; }

I get a: 2007/11/25 18:07:08 [emerg] 19458#0: "wsgi_callable_object" directive is duplicate in nginx-simple.conf:51

Ok, I have fixed the problem with my code.

To understand how this works, I have tested fastcgi_catch_stderr (not documented):

location /test { fastcgi_pass 127.0.0.1:9000; fastcgi_catch_stderr ops; }

but I get a segmentation fault:

ngx_conf_set_str_array_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *p = conf;

ngx_str_t *value, *s; ngx_array_t **a; ngx_conf_post_t *post;

a = (ngx_array_t **) (p + cmd->offset);

- if (*a == NULL) { + if (*a == NGX_CONF_UNSET_PTR) {