summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_script.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-28Fixed ngx_open_cached_file() error handling.Sergey Kandaurov1-0/+6
If of.err is 0, it means that there was a memory allocation error and no further logging and/or processing is needed. The of.failed string can be only accessed if of.err is not 0.
2017-03-22Unified error messages about duplicate directives.Ruslan Ermilov1-1/+1
2016-12-24Win32: support 64-bit compilation with MSVC.Maxim Dounin1-2/+2
There are lots of C4244 warnings (conversion from 'type1' to 'type2', possible loss of data), so they were disabled. The same applies to C4267 warnings (conversion from 'size_t' to 'type', possible loss of data), most notably - conversion from ngx_str_t.len to ngx_variable_value_t.len (which is unsigned:28). Additionally, there is at least one case when it is not possible to fix the warning properly without introducing win32-specific code: recv() on win32 uses "int len", while POSIX defines "size_t len". The ssize_t type now properly defined for 64-bit compilation with MSVC. Caught by warning C4305 (truncation from '__int64' to 'ssize_t'), on "cutoff = NGX_MAX_SIZE_T_VALUE / 10" in ngx_atosz()). Several C4334 warnings (result of 32-bit shift implicitly converted to 64 bits) were fixed by adding explicit conversions. Several C4214 warnings (nonstandard extension used: bit field types other than int) in ngx_http_script.h fixed by changing bit field types from uintptr_t to unsigned.
2016-07-06Fixed regex captures handling without PCRE.Vladimir Homutov1-6/+8
If PCRE is disabled, captures were treated as normal variables in ngx_http_script_compile(), while code calculating flushes array length in ngx_http_compile_complex_value() did not account captures as variables. This could lead to write outside of the array boundary when setting last element to -1. Found with AddressSanitizer.
2016-03-31Fixed logging.Sergey Kandaurov1-1/+1
2016-03-30Style.Ruslan Ermilov1-2/+2
2013-10-18Style.Maxim Dounin1-1/+1
2013-08-20Style improved after 12dd27b74117.Maxim Dounin1-8/+5
2013-08-20Backed out f1a91825730a and 7094bd12c1ff.Maxim Dounin1-6/+1
While ngx_get_full_name() might have a bit more descriptive arguments, the ngx_conf_full_name() is generally easier to use when parsing configuration and limits exposure of cycle->prefix / cycle->conf_prefix details.
2013-08-06Replaced ngx_conf_full_name() with ngx_get_full_name().Valentin Bartenev1-1/+6
The ngx_get_full_name() function takes more readable arguments list.
2013-08-06Fixed memory leaks in the root and auth_basic_user_file directives.Valentin Bartenev1-1/+5
If a relative path is set by variables, then the ngx_conf_full_name() function was called while processing requests, which causes allocations from the cycle pool. A new function that takes pool as an argument was introduced.
2012-12-06Allow the complex value to be defined as an empty string.Ruslan Ermilov1-7/+3
This makes conversion from strings to complex values possible without the loss of functionality.
2012-05-11Rewrite: fixed escaping and possible segfault (ticket #162).Maxim Dounin1-1/+0
The following code resulted in incorrect escaping of uri and possible segfault: location / { rewrite ^(.*) $1?c=$1; return 200 "$uri"; } If there were arguments in a rewrite's replacement string, and length was actually calculated (due to duplicate captures as in the example above, or variables present), the is_args flag was set and incorrectly copied after length calculation. This resulted in escaping applied to the uri part of the replacement, resulting in incorrect escaping. Additionally, buffer was allocated without escaping expected, thus this also resulted in buffer overrun and possible segfault.
2012-02-27Disable symlinks: initialization of the "disable_symlinks" field inValentin Bartenev1-3/+6
ngx_open_file_info_t moved to a separate function. This is preparation for the "from=" parameter implementation of the "disable_symlinks" directive.
2012-02-13Support for disable_symlinks in various modules.Andrey Belov1-0/+3
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-10-12Clear old Location header (if any) while adding a new one.Maxim Dounin1-0/+2
This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
2011-05-03test zero value in an "if" directive consistently with predicates fixed in r3894Igor Sysoev1-1/+1
thanks to Maxim Dounin
2011-04-15values starting with '0' were incorrectly assumed to be falseIgor Sysoev1-1/+1
patch by Maxim Dounin
2011-04-12use memmove() in appropriate placesIgor Sysoev1-1/+1
2010-09-13fix typoIgor Sysoev1-1/+1
2010-09-02new ngx_http_secure_link_module with secure_link, secure_link_md5, andIgor Sysoev1-0/+36
secure_link_expires
2010-07-14ngx_http_test_predicates(), ngx_http_set_predicate_slot()Igor Sysoev1-0/+70
2010-06-18return code textIgor Sysoev1-6/+9
2010-05-14ngx_str_set() and ngx_str_null()Igor Sysoev1-2/+1
2009-11-16fix captures in "rewrite", the bug had been introduced in r3326Igor Sysoev1-3/+3
2009-11-16regex named capturesIgor Sysoev1-23/+3
2009-09-30read_aheadIgor Sysoev1-0/+1
2009-09-25low ENAMETOOLONG logging levelIgor Sysoev1-1/+4
2009-07-14ngx_http_set_exten() is always successful since 0.3.46Igor Sysoev1-5/+1
2009-06-02fix return value on failureIgor Sysoev1-1/+1
2009-04-27-p and --prefix=Igor Sysoev1-4/+5
2009-04-27*) of.test_only to not open file if only stat() is enoughIgor Sysoev1-1/+2
*) of.failed to return exact name of failed syscall
2009-03-27rename ngx_http_scrip_flush_complex_value()Igor Sysoev1-2/+2
to ngx_http_script_flush_complex_value()
2009-03-27fix plain text values using relative path in ngx_http_complex_value(),Igor Sysoev1-5/+5
this fixes the auth_basic_user_file bug introduced in r2589
2009-03-22ngx_http_script_flush_complex_value()Igor Sysoev1-10/+293
ngx_http_complex_value() ngx_http_compile_complex_value()
2009-03-18split ngx_http_script_compile()Igor Sysoev1-159/+234
2009-03-06now regex captures are per-request entitiesIgor Sysoev1-68/+102
2009-02-10fix /?new=arg?old=arg redirect caseIgor Sysoev1-4/+15
2008-12-11fix r2394Igor Sysoev1-14/+4
2008-12-10fix debug loggingIgor Sysoev1-17/+46
2008-09-01escape a query string characters taken from URI while rewriteIgor Sysoev1-0/+1
2008-07-31fix conflicting names "true" and "false"Igor Sysoev1-21/+21
2008-07-30directioIgor Sysoev1-0/+1
2008-06-26ngx_memzero() ngx_open_file_info_tIgor Sysoev1-2/+2
2008-06-23initialize of.uniq in ngx_open_cached_file()Igor Sysoev1-0/+1
2008-06-17*) back out r2040Igor Sysoev1-3/+3
*) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
2008-02-12length calculation did not take into account escaped symbols in argumentsIgor Sysoev1-3/+22
2007-12-27optimizationIgor Sysoev1-1/+1
2007-12-22open_file_cache_min_usesIgor Sysoev1-0/+1