request-processor-procs.tcl

  • last updated 19 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- remove tabs, make indentation more uniform

    • -609
    • +614
    ./request-processor-procs.tcl
- fix for bug #3219: check ExcludedFiles when serving resources

- fix bug with redirects and host-node maps (see http://openacs.org/forums/message-post?parent_id=4106585)

  1. … 1 more file in changeset.
- bug-fix for lookup of hosts defined via host_node_map (see http://openacs.org/forums/message-view?message_id=4106578)

- call ds_init for all types of concrete files for which handlers are registered

- fix 2 typos

  1. … 1 more file in changeset.
- provide fallback values for ad_conn in cases, requests fail early, but templated results are provided

- add ds_init call

  1. … 1 more file in changeset.
- use $::acs::rootdir rather than [acs_root_dir] or [get_server_root]

  1. … 14 more files in changeset.
- revert escaped change for the time being

- use "... eq {} " instead of "template::util::is_nil" where it is clear that the variable exists

  1. … 1 more file in changeset.
- flatten nested "lindex" structures

- merge multiple "lappend" operations

- use "lassign" instead of multiple "lindex" operations

- improve performance util_convert_line_breaks_to_html by reducing

number of regsub operations and more precise regular expressions

- use numeric comparison operator for truth value comparisons

- use "lassign" instead of multiple "lindex" operations

- reduce number of remaining "string equal" operations

  1. … 13 more files in changeset.
- make ad_return deprecated; maybe this function was useful for ancient versions of tcl, but as it is, it does not make sense (see comment in code)

  1. … 1 more file in changeset.
- simplify various wierd ways to set the variable ::template::parse_level

  1. … 5 more files in changeset.
- use "lassign" instead of "foreach" idiom

- use namespace prefix instead of "global" statement

- use compiled string expressions

- use "in" expression instead of "lsearch -exact"

  1. … 1 more file in changeset.
- don't use backslash in multiline expressions

- make long expressions more uniform and more readable

- use "in" or not in (ni) operator instead of lsearch

- brace expressions to allow for tcl compilation

- bump version number

  1. … 23 more files in changeset.
- brace namespace eval

- don't abbreviate subcommands

- use tcl 8.5 extended index format for "string range"

- modernize tcl

  1. … 6 more files in changeset.
- use "lassign" instead of "util_unlist"

  1. … 19 more files in changeset.
- break overlong lines

- get rid of deprecated call to ad_footer

- fix for bug in request processor that leads to Errors of the form: "failed to redirect '404': exceeded recursion limit of 3" in the error.log

- include always vuh in ExtensionPrecedence to preserve documented sematics

- fix bug and potential security hole: before this patch, OpenACS was trying to serve files with arbitrary extensions (i.e. not included in the kernel parameter ExtensionPrecedence) in case the requested file was not found. This is quite dangerous and breaks e.g. the listing of openacs.org/repository (which is a directory), since the directory is moved every night into openacs.org/repository.bak. With the given logic, it tries to server the .bak directory as a file (which does of course not work). That blind logic is not inecessary, and is actually a potential attack vector.

- set "ad_conn peeraddr" to the value of "X-Forwarded-For" only in ReverseProxyMode

  1. … 1 more file in changeset.
- get rid of empty_string_p

  1. … 20 more files in changeset.
- added victor's patch to omit deprecated messages of "ns_info tcllib". Background: naviserver supports multiple (virtual) servers, which might have different tcllibs. Therefore, the preferred command to query this was moved to "ns_server ?-server s? tcllib" and "ns_info tcllib" was deprecated. From the OpenACS point of view, one wants to locate the actual library. Since the variable does not change, it is fine to store it in a per-thread variable which can be efficiently accessed.

  1. … 21 more files in changeset.
Performance improvements for rp_filter and parameter:

- improve performance of rp_filter (which is run on every

non-resources request) significantly (often a factor of 2)

- improve scalability by reducing number of required mutex locks

(e.g. for secret token handling)

  1. … 8 more files in changeset.
- use a single file operation in the most common case

- cleanup and minor performance improvements

  1. … 1 more file in changeset.
A better version of previous commit: refetching site node info just when really needed and better wording on comments. Patch by Gustaf Neumann.

Previous attempt to fix problem of exceeding recursion limit affected the looking up of vuh files. Instead we re-calculate the extra_url ( done as in rp_filter ) before going through the whole process that figures out which file to serve.