passenger 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/NEWS +29 -0
- data/build/agents.rb +1 -0
- data/build/apache2.rb +2 -1
- data/build/cxx_tests.rb +7 -0
- data/build/rpm.rb +17 -22
- data/doc/cxxapi/Constants_8h_source.html +1 -1
- data/doc/cxxapi/Exceptions_8h_source.html +18 -4
- data/doc/cxxapi/Logging_8h_source.html +332 -262
- data/doc/cxxapi/annotated.html +1 -0
- data/doc/cxxapi/classes.html +4 -4
- data/doc/cxxapi/group__Exceptions.html +2 -0
- data/doc/cxxapi/hierarchy.html +1 -0
- data/doc/cxxapi/inherit__graph__35.map +1 -3
- data/doc/cxxapi/inherit__graph__35.md5 +1 -1
- data/doc/cxxapi/inherit__graph__35.png +0 -0
- data/doc/cxxapi/inherit__graph__36.map +3 -1
- data/doc/cxxapi/inherit__graph__36.md5 +1 -1
- data/doc/cxxapi/inherit__graph__36.png +0 -0
- data/doc/cxxapi/inherit__graph__37.map +1 -1
- data/doc/cxxapi/inherit__graph__37.md5 +1 -1
- data/doc/cxxapi/inherit__graph__37.png +0 -0
- data/doc/cxxapi/inherit__graph__38.map +1 -1
- data/doc/cxxapi/inherit__graph__38.md5 +1 -1
- data/doc/cxxapi/inherit__graph__38.png +0 -0
- data/doc/cxxapi/inherit__graph__39.map +1 -1
- data/doc/cxxapi/inherit__graph__39.md5 +1 -1
- data/doc/cxxapi/inherit__graph__39.png +0 -0
- data/doc/cxxapi/inherit__graph__40.map +1 -1
- data/doc/cxxapi/inherit__graph__40.md5 +1 -1
- data/doc/cxxapi/inherit__graph__40.png +0 -0
- data/doc/cxxapi/inherits.html +9 -6
- data/doc/cxxapi/namespacePassenger.html +2 -0
- data/doc/cxxapi/tree.html +2 -0
- data/doc/rdoc/classes/ConditionVariable.html +215 -0
- data/doc/rdoc/classes/Exception.html +120 -0
- data/doc/rdoc/classes/GC.html +113 -0
- data/doc/rdoc/classes/IO.html +221 -0
- data/doc/rdoc/classes/PhusionPassenger.html +397 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +180 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +647 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +654 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +619 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +142 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +231 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +588 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +147 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +279 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +123 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +299 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +206 -0
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +155 -0
- data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +367 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +95 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +351 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +200 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +410 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +156 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +115 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +202 -0
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
- data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +273 -0
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +162 -0
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +673 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +415 -0
- data/doc/rdoc/classes/PhusionPassenger/NativeSupportLoader.html +134 -0
- data/doc/rdoc/classes/PhusionPassenger/Packaging.html +129 -0
- data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +1972 -0
- data/doc/rdoc/classes/PhusionPassenger/Plugin.html +237 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +312 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +218 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +114 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +259 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +139 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +118 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +135 -0
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +378 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone.html +111 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +252 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +161 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +132 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +151 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +189 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +177 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +341 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +203 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +156 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +168 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +86 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +135 -0
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +1543 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +204 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +171 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +260 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +194 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +265 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +561 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +182 -0
- data/doc/rdoc/classes/Process.html +115 -0
- data/doc/rdoc/classes/Signal.html +139 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/DEVELOPERS_TXT.html +280 -0
- data/doc/rdoc/files/README.html +157 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +135 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +128 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +141 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +146 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +125 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +147 -0
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +120 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +128 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +137 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +125 -0
- data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +160 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +136 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +133 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +136 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +120 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +179 -0
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +132 -0
- data/doc/rdoc/fr_class_index.html +139 -0
- data/doc/rdoc/fr_file_index.html +108 -0
- data/doc/rdoc/fr_method_index.html +439 -0
- data/doc/rdoc/index.html +26 -0
- data/doc/rdoc/rdoc-style.css +187 -0
- data/ext/apache2/Configuration.cpp +41 -0
- data/ext/apache2/Configuration.hpp +19 -0
- data/ext/apache2/Hooks.cpp +67 -5
- data/ext/common/Constants.h +1 -1
- data/ext/common/Exceptions.h +14 -0
- data/ext/common/Logging.h +76 -6
- data/ext/common/LoggingAgent/FilterSupport.h +1317 -0
- data/ext/common/LoggingAgent/LoggingServer.h +93 -4
- data/ext/common/LoggingAgent/RemoteSender.h +5 -5
- data/ext/common/Utils/StrIntUtils.cpp +12 -1
- data/ext/common/Utils/StrIntUtils.h +2 -1
- data/ext/common/Utils/StringMap.h +100 -0
- data/ext/nginx/Configuration.c +0 -1
- data/ext/nginx/ContentHandler.c +33 -7
- data/lib/phusion_passenger.rb +2 -2
- data/lib/phusion_passenger/abstract_request_handler.rb +5 -0
- data/lib/phusion_passenger/analytics_logger.rb +77 -11
- data/lib/phusion_passenger/dependencies.rb +11 -1
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/utils.rb +9 -1
- data/test/cxx/FilterSupportTest.cpp +276 -0
- data/test/cxx/LoggingTest.cpp +28 -0
- data/test/cxx/StringMapTest.cpp +70 -0
- data/test/integration_tests/cgi_environment_spec.rb +10 -0
- metadata +170 -8
- data/ext/common/libboost_oxt/aggregate.cpp +0 -10
- data/ext/common/libpassenger_common/aggregate.cpp +0 -15
@@ -0,0 +1,98 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: PhusionPassenger::Rack::ApplicationSpawner::Error</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::Rack::ApplicationSpawner::Error</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../../../files/lib/phusion_passenger/rack/application_spawner_rb.html">lib/phusion_passenger/rack/application_spawner.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
AbstractServer::ServerError
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><p>
|
79
|
+
This exception means that the <a
|
80
|
+
href="../ApplicationSpawner.html">ApplicationSpawner</a> server process
|
81
|
+
exited unexpectedly.
|
82
|
+
</p>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
</body>
|
98
|
+
</html>
|
@@ -0,0 +1,218 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: PhusionPassenger::Rack::RequestHandler</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::Rack::RequestHandler</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../../files/lib/phusion_passenger/rack/request_handler_rb.html">lib/phusion_passenger/rack/request_handler.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
AbstractRequestHandler
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><p>
|
79
|
+
A request handler for <a href="../Rack.html">Rack</a> applications.
|
80
|
+
</p>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<div class="sectiontitle">Methods</div>
|
86
|
+
<ul>
|
87
|
+
<li><a href="#M000026">new</a></li>
|
88
|
+
<li><a href="#M000027">process_request</a></li>
|
89
|
+
</ul>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<div class="sectiontitle">Public Class methods</div>
|
97
|
+
<div class="method">
|
98
|
+
<div class="title">
|
99
|
+
<a name="M000026"></a><b>new</b>(owner_pipe, app, options = {})
|
100
|
+
</div>
|
101
|
+
<div class="description">
|
102
|
+
<p>
|
103
|
+
<tt>app</tt> is the <a href="../Rack.html">Rack</a> application object.
|
104
|
+
</p>
|
105
|
+
</div>
|
106
|
+
<div class="sourcecode">
|
107
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p>
|
108
|
+
<div id="M000026_source" class="dyn-source">
|
109
|
+
<pre>
|
110
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 60</span>
|
111
|
+
60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">app</span>, <span class="ruby-identifier">options</span> = {})
|
112
|
+
61: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span>)
|
113
|
+
62: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
|
114
|
+
63: <span class="ruby-keyword kw">end</span>
|
115
|
+
</pre>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
<div class="sectiontitle">Protected Instance methods</div>
|
120
|
+
<div class="method">
|
121
|
+
<div class="title">
|
122
|
+
<a name="M000027"></a><b>process_request</b>(env, input, output, full_http_response)
|
123
|
+
</div>
|
124
|
+
<div class="description">
|
125
|
+
<p>
|
126
|
+
Overrided method.
|
127
|
+
</p>
|
128
|
+
</div>
|
129
|
+
<div class="sourcecode">
|
130
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p>
|
131
|
+
<div id="M000027_source" class="dyn-source">
|
132
|
+
<pre>
|
133
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 67</span>
|
134
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>, <span class="ruby-identifier">full_http_response</span>)
|
135
|
+
68: <span class="ruby-identifier">rewindable_input</span> = <span class="ruby-constant">PhusionPassenger</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">RewindableInput</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">input</span>)
|
136
|
+
69: <span class="ruby-keyword kw">begin</span>
|
137
|
+
70: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_VERSION</span>] = <span class="ruby-constant">RACK_VERSION_VALUE</span>
|
138
|
+
71: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_INPUT</span>] = <span class="ruby-identifier">rewindable_input</span>
|
139
|
+
72: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_ERRORS</span>] = <span class="ruby-constant">STDERR</span>
|
140
|
+
73: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTITHREAD</span>] = <span class="ruby-keyword kw">false</span>
|
141
|
+
74: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTIPROCESS</span>] = <span class="ruby-keyword kw">true</span>
|
142
|
+
75: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_RUN_ONCE</span>] = <span class="ruby-keyword kw">false</span>
|
143
|
+
76:
|
144
|
+
77: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
|
145
|
+
78: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>)
|
146
|
+
79: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>] <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
|
147
|
+
80: <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>] = <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>]
|
148
|
+
81: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>)
|
149
|
+
82: <span class="ruby-keyword kw">end</span>
|
150
|
+
83: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>]
|
151
|
+
84: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_TYPE</span>)
|
152
|
+
85: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>] <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>]
|
153
|
+
86: <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>] = <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>]
|
154
|
+
87: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_TYPE</span>)
|
155
|
+
88: <span class="ruby-keyword kw">end</span>
|
156
|
+
89:
|
157
|
+
90: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">YES</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">ON</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">ONE</span>
|
158
|
+
91: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTPS_DOWNCASE</span>
|
159
|
+
92: <span class="ruby-keyword kw">else</span>
|
160
|
+
93: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTP</span>
|
161
|
+
94: <span class="ruby-keyword kw">end</span>
|
162
|
+
95:
|
163
|
+
96: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">body</span> = <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
|
164
|
+
97: <span class="ruby-keyword kw">begin</span>
|
165
|
+
98: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">full_http_response</span>
|
166
|
+
99: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"HTTP/1.1 #{status.to_i.to_s} Whatever#{CRLF}"</span>)
|
167
|
+
100: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"Connection: close#{CRLF}"</span>)
|
168
|
+
101: <span class="ruby-keyword kw">end</span>
|
169
|
+
102: <span class="ruby-identifier">headers_output</span> = [
|
170
|
+
103: <span class="ruby-constant">STATUS</span>, <span class="ruby-identifier">status</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">CRLF</span>,
|
171
|
+
104: <span class="ruby-constant">X_POWERED_BY</span>, <span class="ruby-ivar">@passenger_header</span>, <span class="ruby-constant">CRLF</span>
|
172
|
+
105: ]
|
173
|
+
106: <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span>
|
174
|
+
107: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
175
|
+
108: <span class="ruby-identifier">values</span> = <span class="ruby-identifier">values</span>.<span class="ruby-identifier">split</span>(<span class="ruby-constant">NEWLINE</span>)
|
176
|
+
109: <span class="ruby-keyword kw">end</span>
|
177
|
+
110: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
178
|
+
111: <span class="ruby-identifier">headers_output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">key</span>
|
179
|
+
112: <span class="ruby-identifier">headers_output</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NAME_VALUE_SEPARATOR</span>
|
180
|
+
113: <span class="ruby-identifier">headers_output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">value</span>
|
181
|
+
114: <span class="ruby-identifier">headers_output</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">CRLF</span>
|
182
|
+
115: <span class="ruby-keyword kw">end</span>
|
183
|
+
116: <span class="ruby-keyword kw">end</span>
|
184
|
+
117: <span class="ruby-identifier">headers_output</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">CRLF</span>
|
185
|
+
118:
|
186
|
+
119: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
187
|
+
120: <span class="ruby-comment cmt"># The body may be an ActionController::StringCoercion::UglyBody</span>
|
188
|
+
121: <span class="ruby-comment cmt"># object instead of a real Array, even when #is_a? claims so.</span>
|
189
|
+
122: <span class="ruby-comment cmt"># Call #to_a just to be sure.</span>
|
190
|
+
123: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">writev2</span>(<span class="ruby-identifier">headers_output</span>, <span class="ruby-identifier">body</span>.<span class="ruby-identifier">to_a</span>)
|
191
|
+
124: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
192
|
+
125: <span class="ruby-identifier">headers_output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">body</span>
|
193
|
+
126: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">writev</span>(<span class="ruby-identifier">headers_output</span>)
|
194
|
+
127: <span class="ruby-keyword kw">else</span>
|
195
|
+
128: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">writev</span>(<span class="ruby-identifier">headers_output</span>)
|
196
|
+
129: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>
|
197
|
+
130: <span class="ruby-identifier">body</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
198
|
+
131: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">s</span>)
|
199
|
+
132: <span class="ruby-keyword kw">end</span>
|
200
|
+
133: <span class="ruby-keyword kw">end</span>
|
201
|
+
134: <span class="ruby-keyword kw">end</span>
|
202
|
+
135: <span class="ruby-keyword kw">ensure</span>
|
203
|
+
136: <span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:close</span>)
|
204
|
+
137: <span class="ruby-keyword kw">end</span>
|
205
|
+
138: <span class="ruby-keyword kw">ensure</span>
|
206
|
+
139: <span class="ruby-identifier">rewindable_input</span>.<span class="ruby-identifier">close</span>
|
207
|
+
140: <span class="ruby-keyword kw">end</span>
|
208
|
+
141: <span class="ruby-keyword kw">end</span>
|
209
|
+
</pre>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
</div>
|
216
|
+
|
217
|
+
</body>
|
218
|
+
</html>
|
@@ -0,0 +1,114 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Module: PhusionPassenger::Rails3Extensions</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Module</span><br />PhusionPassenger::Rails3Extensions</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/phusion_passenger/rails3_extensions/init_rb.html">lib/phusion_passenger/rails3_extensions/init.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
</table>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
</table>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
<div id="content">
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<div class="sectiontitle">Methods</div>
|
76
|
+
<ul>
|
77
|
+
<li><a href="#M000171">init!</a></li>
|
78
|
+
</ul>
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
<div class="sectiontitle">Classes and Modules</div>
|
83
|
+
Class <a href="Rails3Extensions/AnalyticsLogging.html" class="link">PhusionPassenger::Rails3Extensions::AnalyticsLogging</a><br />
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<div class="sectiontitle">Public Class methods</div>
|
89
|
+
<div class="method">
|
90
|
+
<div class="title">
|
91
|
+
<a name="M000171"></a><b>init!</b>(options)
|
92
|
+
</div>
|
93
|
+
<div class="sourcecode">
|
94
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000171_source')" id="l_M000171_source">show source</a> ]</p>
|
95
|
+
<div id="M000171_source" class="dyn-source">
|
96
|
+
<pre>
|
97
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 30</span>
|
98
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init!</span>(<span class="ruby-identifier">options</span>)
|
99
|
+
31: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">AnalyticsLogging</span>.<span class="ruby-identifier">install!</span>(<span class="ruby-identifier">options</span>)
|
100
|
+
32: <span class="ruby-comment cmt"># Remove code to save memory.</span>
|
101
|
+
33: <span class="ruby-constant">PhusionPassenger</span><span class="ruby-operator">::</span><span class="ruby-constant">Rails3Extensions</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:remove_const</span>, <span class="ruby-identifier">:AnalyticsLogging</span>)
|
102
|
+
34: <span class="ruby-constant">PhusionPassenger</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:remove_const</span>, <span class="ruby-identifier">:Rails3Extensions</span>)
|
103
|
+
35: <span class="ruby-keyword kw">end</span>
|
104
|
+
36: <span class="ruby-keyword kw">end</span>
|
105
|
+
</pre>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
</body>
|
114
|
+
</html>
|
@@ -0,0 +1,259 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: PhusionPassenger::Rails3Extensions::AnalyticsLogging</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::Rails3Extensions::AnalyticsLogging</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../../files/lib/phusion_passenger/rails3_extensions/init_rb.html">lib/phusion_passenger/rails3_extensions/init.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
ActiveSupport::LogSubscriber
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div class="sectiontitle">Methods</div>
|
82
|
+
<ul>
|
83
|
+
<li><a href="#M000176">cache_fetch_hit</a></li>
|
84
|
+
<li><a href="#M000177">cache_generate</a></li>
|
85
|
+
<li><a href="#M000175">cache_read</a></li>
|
86
|
+
<li><a href="#M000172">install!</a></li>
|
87
|
+
<li><a href="#M000173">process_action</a></li>
|
88
|
+
<li><a href="#M000174">sql</a></li>
|
89
|
+
</ul>
|
90
|
+
|
91
|
+
<div class="sectiontitle">Included Modules</div>
|
92
|
+
<ul>
|
93
|
+
<li><a href="AnalyticsLogging/ACExtension.html">ACExtension</a></li>
|
94
|
+
<li><a href="AnalyticsLogging/ASBenchmarkableExtension.html">ASBenchmarkableExtension</a></li>
|
95
|
+
</ul>
|
96
|
+
|
97
|
+
|
98
|
+
<div class="sectiontitle">Classes and Modules</div>
|
99
|
+
Module <a href="AnalyticsLogging/ACExtension.html" class="link">PhusionPassenger::Rails3Extensions::AnalyticsLogging::ACExtension</a><br />
|
100
|
+
Module <a href="AnalyticsLogging/ASBenchmarkableExtension.html" class="link">PhusionPassenger::Rails3Extensions::AnalyticsLogging::ASBenchmarkableExtension</a><br />
|
101
|
+
Class <a href="AnalyticsLogging/ExceptionLogger.html" class="link">PhusionPassenger::Rails3Extensions::AnalyticsLogging::ExceptionLogger</a><br />
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<div class="sectiontitle">Public Class methods</div>
|
107
|
+
<div class="method">
|
108
|
+
<div class="title">
|
109
|
+
<a name="M000172"></a><b>install!</b>(options)
|
110
|
+
</div>
|
111
|
+
<div class="sourcecode">
|
112
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000172_source')" id="l_M000172_source">show source</a> ]</p>
|
113
|
+
<div id="M000172_source" class="dyn-source">
|
114
|
+
<pre>
|
115
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 41</span>
|
116
|
+
41: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">install!</span>(<span class="ruby-identifier">options</span>)
|
117
|
+
42: <span class="ruby-identifier">analytics_logger</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"analytics_logger"</span>]
|
118
|
+
43: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">analytics_logger</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value str">"analytics"</span>]
|
119
|
+
44:
|
120
|
+
45: <span class="ruby-comment cmt"># If the Ruby interpreter supports GC statistics then turn it on</span>
|
121
|
+
46: <span class="ruby-comment cmt"># so that the info can be logged.</span>
|
122
|
+
47: <span class="ruby-constant">GC</span>.<span class="ruby-identifier">enable_stats</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GC</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:enable_stats</span>)
|
123
|
+
48:
|
124
|
+
49: <span class="ruby-identifier">subscriber</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>
|
125
|
+
50: <span class="ruby-constant">AnalyticsLogging</span>.<span class="ruby-identifier">attach_to</span>(<span class="ruby-identifier">:action_controller</span>, <span class="ruby-identifier">subscriber</span>)
|
126
|
+
51: <span class="ruby-constant">AnalyticsLogging</span>.<span class="ruby-identifier">attach_to</span>(<span class="ruby-identifier">:active_record</span>, <span class="ruby-identifier">subscriber</span>)
|
127
|
+
52: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Cache</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>)
|
128
|
+
53: <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Cache</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">instrument</span> = <span class="ruby-keyword kw">true</span>
|
129
|
+
54: <span class="ruby-constant">AnalyticsLogging</span>.<span class="ruby-identifier">attach_to</span>(<span class="ruby-identifier">:active_support</span>, <span class="ruby-identifier">subscriber</span>)
|
130
|
+
55: <span class="ruby-keyword kw">end</span>
|
131
|
+
56:
|
132
|
+
57: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">ActionDispatch</span><span class="ruby-operator">::</span><span class="ruby-constant">ShowExceptions</span>)
|
133
|
+
58: <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">middleware</span>.<span class="ruby-identifier">insert_after</span>(
|
134
|
+
59: <span class="ruby-constant">ActionDispatch</span><span class="ruby-operator">::</span><span class="ruby-constant">ShowExceptions</span>,
|
135
|
+
60: <span class="ruby-constant">ExceptionLogger</span>, <span class="ruby-identifier">analytics_logger</span>)
|
136
|
+
61: <span class="ruby-keyword kw">end</span>
|
137
|
+
62:
|
138
|
+
63: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>)
|
139
|
+
64: <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
140
|
+
65: <span class="ruby-identifier">include</span> <span class="ruby-constant">ACExtension</span>
|
141
|
+
66: <span class="ruby-keyword kw">end</span>
|
142
|
+
67: <span class="ruby-keyword kw">end</span>
|
143
|
+
68:
|
144
|
+
69: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Benchmarkable</span>)
|
145
|
+
70: <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">Benchmarkable</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
146
|
+
71: <span class="ruby-identifier">include</span> <span class="ruby-constant">ASBenchmarkableExtension</span>
|
147
|
+
72: <span class="ruby-identifier">alias_method_chain</span> <span class="ruby-identifier">:benchmark</span>, <span class="ruby-identifier">:passenger</span>
|
148
|
+
73: <span class="ruby-keyword kw">end</span>
|
149
|
+
74: <span class="ruby-keyword kw">end</span>
|
150
|
+
75:
|
151
|
+
76: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
152
|
+
77: <span class="ruby-keyword kw">end</span>
|
153
|
+
</pre>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
<div class="sectiontitle">Public Instance methods</div>
|
158
|
+
<div class="method">
|
159
|
+
<div class="title">
|
160
|
+
<a name="M000176"></a><b>cache_fetch_hit</b>(event)
|
161
|
+
</div>
|
162
|
+
<div class="sourcecode">
|
163
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000176_source')" id="l_M000176_source">show source</a> ]</p>
|
164
|
+
<div id="M000176_source" class="dyn-source">
|
165
|
+
<pre>
|
166
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 106</span>
|
167
|
+
106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_fetch_hit</span>(<span class="ruby-identifier">event</span>)
|
168
|
+
107: <span class="ruby-constant">PhusionPassenger</span>.<span class="ruby-identifier">log_cache_hit</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:key</span>])
|
169
|
+
108: <span class="ruby-keyword kw">end</span>
|
170
|
+
</pre>
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
<div class="method">
|
175
|
+
<div class="title">
|
176
|
+
<a name="M000177"></a><b>cache_generate</b>(event)
|
177
|
+
</div>
|
178
|
+
<div class="sourcecode">
|
179
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000177_source')" id="l_M000177_source">show source</a> ]</p>
|
180
|
+
<div id="M000177_source" class="dyn-source">
|
181
|
+
<pre>
|
182
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 110</span>
|
183
|
+
110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_generate</span>(<span class="ruby-identifier">event</span>)
|
184
|
+
111: <span class="ruby-constant">PhusionPassenger</span>.<span class="ruby-identifier">log_cache_miss</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:key</span>],
|
185
|
+
112: <span class="ruby-identifier">event</span>.<span class="ruby-identifier">duration</span> <span class="ruby-operator">*</span> <span class="ruby-value">1000</span>)
|
186
|
+
113: <span class="ruby-keyword kw">end</span>
|
187
|
+
</pre>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
</div>
|
191
|
+
<div class="method">
|
192
|
+
<div class="title">
|
193
|
+
<a name="M000175"></a><b>cache_read</b>(event)
|
194
|
+
</div>
|
195
|
+
<div class="sourcecode">
|
196
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000175_source')" id="l_M000175_source">show source</a> ]</p>
|
197
|
+
<div id="M000175_source" class="dyn-source">
|
198
|
+
<pre>
|
199
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 98</span>
|
200
|
+
98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_read</span>(<span class="ruby-identifier">event</span>)
|
201
|
+
99: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:hit</span>]
|
202
|
+
100: <span class="ruby-constant">PhusionPassenger</span>.<span class="ruby-identifier">log_cache_hit</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:key</span>])
|
203
|
+
101: <span class="ruby-keyword kw">else</span>
|
204
|
+
102: <span class="ruby-constant">PhusionPassenger</span>.<span class="ruby-identifier">log_cache_miss</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:key</span>])
|
205
|
+
103: <span class="ruby-keyword kw">end</span>
|
206
|
+
104: <span class="ruby-keyword kw">end</span>
|
207
|
+
</pre>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
</div>
|
211
|
+
<div class="method">
|
212
|
+
<div class="title">
|
213
|
+
<a name="M000173"></a><b>process_action</b>(event)
|
214
|
+
</div>
|
215
|
+
<div class="sourcecode">
|
216
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000173_source')" id="l_M000173_source">show source</a> ]</p>
|
217
|
+
<div id="M000173_source" class="dyn-source">
|
218
|
+
<pre>
|
219
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 79</span>
|
220
|
+
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_action</span>(<span class="ruby-identifier">event</span>)
|
221
|
+
80: <span class="ruby-identifier">log</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-constant">PASSENGER_ANALYTICS_WEB_LOG</span>]
|
222
|
+
81: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">log</span>
|
223
|
+
82: <span class="ruby-identifier">view_runtime</span> = <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:view_runtime</span>]
|
224
|
+
83: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">message</span>(<span class="ruby-node">"View rendering time: #{(view_runtime * 1000).to_i}"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">view_runtime</span>
|
225
|
+
84: <span class="ruby-keyword kw">end</span>
|
226
|
+
85: <span class="ruby-keyword kw">end</span>
|
227
|
+
</pre>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
<div class="method">
|
232
|
+
<div class="title">
|
233
|
+
<a name="M000174"></a><b>sql</b>(event)
|
234
|
+
</div>
|
235
|
+
<div class="sourcecode">
|
236
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000174_source')" id="l_M000174_source">show source</a> ]</p>
|
237
|
+
<div id="M000174_source" class="dyn-source">
|
238
|
+
<pre>
|
239
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rails3_extensions/init.rb, line 87</span>
|
240
|
+
87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sql</span>(<span class="ruby-identifier">event</span>)
|
241
|
+
88: <span class="ruby-identifier">log</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-constant">PASSENGER_ANALYTICS_WEB_LOG</span>]
|
242
|
+
89: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">log</span>
|
243
|
+
90: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:name</span>]
|
244
|
+
91: <span class="ruby-identifier">sql</span> = <span class="ruby-identifier">event</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:sql</span>]
|
245
|
+
92: <span class="ruby-identifier">digest</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-node">"#{name}\0#{sql}\0#{rand}"</span>)
|
246
|
+
93: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">measured_time_points</span>(<span class="ruby-node">"DB BENCHMARK: #{digest}"</span>,
|
247
|
+
94: <span class="ruby-identifier">event</span>.<span class="ruby-identifier">time</span>, <span class="ruby-identifier">event</span>.<span class="ruby-identifier">end</span>, <span class="ruby-node">"#{name}\n#{sql}"</span>)
|
248
|
+
95: <span class="ruby-keyword kw">end</span>
|
249
|
+
96: <span class="ruby-keyword kw">end</span>
|
250
|
+
</pre>
|
251
|
+
</div>
|
252
|
+
</div>
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
|
256
|
+
</div>
|
257
|
+
|
258
|
+
</body>
|
259
|
+
</html>
|