Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -r1.90 -r1.91 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 8 Dec 2012 17:42:32 -0000 1.90 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 20 Dec 2012 15:47:16 -0000 1.91 @@ -391,13 +391,14 @@ # which differs the mtime it had when last loaded, mark to be loaded. if { [file isfile $full_path] } { set mtime [file mtime $full_path] - - if { $force_reload_p || (![nsv_exists apm_library_mtime $relative_path] || \ - [nsv_get apm_library_mtime $relative_path] != $mtime) } { - - lappend changed_files $relative_path + ns_log notice "apm_mark_files_for_reload nsv-mtime [nsv_get apm_library_mtime $relative_path] mtime $mtime $full_path // [expr {[clock seconds]-$mtime}]" + if { $force_reload_p + || (![nsv_exists apm_library_mtime $relative_path] + || [nsv_get apm_library_mtime $relative_path] != $mtime + || [clock seconds]-$mtime < 5) } { + lappend changed_files $relative_path } - } + } } if { [llength $changed_files] > 0 } { @@ -425,9 +426,9 @@ if { $changed_files_var ne "" } { upvar $changed_files_var changed_files } - + ns_log notice "apm_mark_version_for_reload try to get package_key from $version_id" set package_key [apm_package_key_from_version_id $version_id] - + ns_log notice "apm_mark_version_for_reload $package_key $version_id" set changed_files [list] set file_types [list tcl_procs query_file] Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.106 -r1.107 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 5 Oct 2012 21:33:27 -0000 1.106 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 20 Dec 2012 15:47:16 -0000 1.107 @@ -578,9 +578,8 @@ set user_agent [ns_set iget $headers User-Agent] ns_log Debug "user agent is $user_agent" - set match_seeker [regexp ".*YahooSeeker.*" $user_agent] - set match_slurp [regexp ".*Yahoo! Slurp.*" $user_agent] - if {$match_seeker == 1 || $match_slurp == 1} { + if {[string match "*YahooSeeker*" $user_agent] + || [string match ".*Yahoo! Slurp.*" $user_agent]} { ns_log Notice "nasty spider $user_agent" ns_returnredirect "http://www.yahoo.com" return "filter_return" @@ -686,6 +685,12 @@ ad_conn -set charset "" } + if {[ns_info name] eq "NaviServer"} { + # provide context information for background writer + set requestor [expr {$::ad_conn(user_id) == 0 ? [ad_conn peeraddr] : $::ad_conn(user_id)}] + catch {ns_conn clientdata [list $requestor [ns_conn url]]} + } + # Who's online whos_online::user_requested_page [ad_conn untrusted_user_id] @@ -695,7 +700,7 @@ # ##### - if { ![empty_string_p [ad_conn object_id]] } { + if { [ad_conn object_id] ne "" } { ad_try { switch -glob -- [ad_conn extra_url] { admin/* { @@ -922,6 +927,12 @@ # OK, we didn't find a normal file. Let's look for a path info style thingy, # visiting possible file matches from most specific to least. + # On iternal redirects, the current extra_url might be from a + # previous request, leading e.g. to a not-found error. This can + # lead to an hard-to find loop which ends with a "recursion depth + # exceeded". Therefore, we refetch the url from the server. + set extra_url [string trimleft [ns_conn url] /] + foreach prefix [rp_path_prefixes $extra_url] { foreach resolve_value $resolve_values { foreach {root match_prefix} $resolve_value {}