[nginx] enhance options

2018-02-04 Thread 洪志道
Hi!

Maybe it's better to keep the options more complete, and consider the
follow operation as a mistake.

/usr/local/nginx/sbin/nginx -

hg diff
diff -r cbf59d483c9c src/core/nginx.c
--- a/src/core/nginx.c Tue Jan 16 13:52:03 2018 +0300
+++ b/src/core/nginx.c Sun Feb 04 07:41:36 2018 -0500
@@ -753,7 +753,12 @@
 return NGX_ERROR;
 }

-while (*p) {
+do {
+
+if (*p == '\0') {
+ngx_log_stderr(0, "missing option: \"%s\"", argv[i]);
+return NGX_ERROR;
+}

 switch (*p++) {

@@ -855,7 +860,8 @@
 ngx_log_stderr(0, "invalid option: \"%c\"", *(p - 1));
 return NGX_ERROR;
 }
-}
+
+} while (*p);

 next:

Thanks.
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: [PATCH] Add application/webassembly content type

2018-02-04 Thread Maxim Dounin
Hello!

On Fri, Feb 02, 2018 at 04:16:53PM +0100, Niklas Fiekas wrote:

> Well, this is embarrassing. The correct content type is actually 
> application/wasm. (application/webassembly was overruled because 
> Chromium went ahead with the other one.)
> 
> https://github.com/WebAssembly/spec/issues/573

As far as I see from the link provided and the IANA official list 
as available at [1], niether application/webassembly nor 
application/wasm are currently registered MIME types.  Once any of 
them is registered, we can consider adding it to nginx default 
mime.types.

[1] https://www.iana.org/assignments/media-types/media-types.xhtml

-- 
Maxim Dounin
http://mdounin.ru/
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


Fwd: Proposal: Change folder for PHP CGI scripts

2018-02-04 Thread Benedikt Roßgardt via nginx-devel
Hi,When using the default configuration from the nginx.conf file, I was running into "File not found" issues. The problem for me was that the default configuration is pointing to the /script folder instead of my document root.Maybe there is a reason for it, but I propose to use the root document folder instead.Best,Benedikt

patch.diff
Description: Binary data
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: [nginx] enhance options

2018-02-04 Thread Junwang Zhao
LGTM

On Sun, Feb 4, 2018 at 8:49 PM, 洪志道  wrote:

> Hi!
>
> Maybe it's better to keep the options more complete, and consider the
> follow operation as a mistake.
>
> /usr/local/nginx/sbin/nginx -
>
> hg diff
> diff -r cbf59d483c9c src/core/nginx.c
> --- a/src/core/nginx.c Tue Jan 16 13:52:03 2018 +0300
> +++ b/src/core/nginx.c Sun Feb 04 07:41:36 2018 -0500
> @@ -753,7 +753,12 @@
>  return NGX_ERROR;
>  }
>
> -while (*p) {
> +do {
> +
> +if (*p == '\0') {
> +ngx_log_stderr(0, "missing option: \"%s\"", argv[i]);
> +return NGX_ERROR;
> +}
>
>  switch (*p++) {
>
> @@ -855,7 +860,8 @@
>  ngx_log_stderr(0, "invalid option: \"%c\"", *(p - 1));
>  return NGX_ERROR;
>  }
> -}
> +
> +} while (*p);
>
>  next:
>
> Thanks.
>
> ___
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel