Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uwsgi_opt_set_int: use strtol() and warn on non-numeric data #2032

Merged
merged 2 commits into from
Jun 26, 2019

Commits on Jun 26, 2019

  1. uwsgi_opt_set_int: use strtol() and warn on non-numeric data

    This should not change the existing behavior of using 0 when
    a non-numeric value is provided, but loudly logs:
    
        $ uwsgi test.ini --processes 2x
        [uWSGI] getting INI configuration from test.ini
        [WARNING] non-numeric value "2x" for option "processes" - using 2 !
        [WARNING] non-numeric value "true" for option "http-keepalive" - using 0 !
        *** Starting uWSGI 2.1-dev-ade7d170 (64bit) on [Sun Jun 23 18:36:29 2019] ***
        compiled with version: 8.3.0 on 23 June 2019 16:22:05
        ...
    
    It might be saner to not even start with invalid options. However,
    hypothetical setups with http-keepalive=off or http-keepalive=false may
    then fail to start at all and people might get unahppy.
    awelzel authored and Arne Welzel committed Jun 26, 2019
    Configuration menu
    Copy the full SHA
    fcaeb88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb74161 View commit details
    Browse the repository at this point in the history