mongrel_esi 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -8
- data/Rakefile +4 -12
- data/doc/rdoc/classes/ESI.html +169 -0
- data/doc/rdoc/classes/ESI/Cache.html +178 -0
- data/doc/rdoc/classes/ESI/Cache.src/M000060.html +17 -0
- data/doc/rdoc/classes/ESI/Cache.src/M000061.html +20 -0
- data/doc/rdoc/classes/ESI/Config.html +291 -0
- data/doc/rdoc/classes/ESI/Config.src/M000043.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000044.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000045.html +35 -0
- data/doc/rdoc/classes/ESI/Config.src/M000046.html +38 -0
- data/doc/rdoc/classes/ESI/Config.src/M000047.html +23 -0
- data/doc/rdoc/classes/ESI/Config.src/M000048.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000049.html +20 -0
- data/doc/rdoc/classes/ESI/Config.src/M000050.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000051.html +24 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.html +212 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000055.html +19 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000056.html +19 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000057.html +18 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000058.html +18 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000059.html +18 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.html +187 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000052.html +19 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000053.html +21 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000054.html +21 -0
- data/doc/rdoc/classes/ESI/Dispatcher.html +172 -0
- data/doc/rdoc/classes/ESI/Dispatcher.src/M000062.html +23 -0
- data/doc/rdoc/classes/ESI/Dispatcher.src/M000063.html +20 -0
- data/doc/rdoc/classes/ESI/Fragment.html +218 -0
- data/doc/rdoc/classes/ESI/Fragment.src/M000076.html +21 -0
- data/doc/rdoc/classes/ESI/Fragment.src/M000077.html +18 -0
- data/doc/rdoc/classes/ESI/Fragment.src/M000078.html +18 -0
- data/doc/rdoc/classes/ESI/Handler.html +236 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000079.html +19 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000080.html +161 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000081.html +24 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000082.html +18 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000083.html +26 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000084.html +30 -0
- data/doc/rdoc/classes/ESI/Invalidator.html +131 -0
- data/doc/rdoc/classes/ESI/Invalidator.src/M000004.html +41 -0
- data/doc/rdoc/classes/ESI/Log.html +251 -0
- data/doc/rdoc/classes/ESI/Log.src/M000005.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000006.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000007.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000008.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000009.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000010.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000011.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000012.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000013.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.html +314 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000034.html +24 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000035.html +22 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000036.html +19 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000037.html +23 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000038.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000039.html +19 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000040.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000041.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000042.html +17 -0
- data/doc/rdoc/classes/ESI/Router.html +229 -0
- data/doc/rdoc/classes/ESI/Router.src/M000073.html +36 -0
- data/doc/rdoc/classes/ESI/Router.src/M000074.html +25 -0
- data/doc/rdoc/classes/ESI/Router.src/M000075.html +24 -0
- data/doc/rdoc/classes/ESI/RubyCache.html +278 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000064.html +20 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000065.html +22 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000066.html +21 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000067.html +22 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000068.html +18 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000069.html +22 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000070.html +18 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000071.html +18 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000072.html +18 -0
- data/doc/rdoc/classes/ESI/Tag.html +137 -0
- data/doc/rdoc/classes/ESI/Tag/Attempt.html +113 -0
- data/doc/rdoc/classes/ESI/Tag/Base.html +267 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000028.html +26 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000029.html +23 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000030.html +22 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000031.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000032.html +22 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000033.html +23 -0
- data/doc/rdoc/classes/ESI/Tag/Except.html +184 -0
- data/doc/rdoc/classes/ESI/Tag/Except.src/M000020.html +21 -0
- data/doc/rdoc/classes/ESI/Tag/Except.src/M000021.html +20 -0
- data/doc/rdoc/classes/ESI/Tag/Except.src/M000022.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/Include.html +189 -0
- data/doc/rdoc/classes/ESI/Tag/Include.src/M000017.html +20 -0
- data/doc/rdoc/classes/ESI/Tag/Include.src/M000018.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/Include.src/M000019.html +125 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest.html +199 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest.src/M000014.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest.src/M000015.html +42 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest/Error.html +155 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest/Error.src/M000016.html +19 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.html +171 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000025.html +19 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000026.html +51 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000027.html +19 -0
- data/doc/rdoc/classes/ESI/Tag/Try.html +161 -0
- data/doc/rdoc/classes/ESI/Tag/Try.src/M000023.html +40 -0
- data/doc/rdoc/classes/ESI/Tag/Try.src/M000024.html +18 -0
- data/doc/rdoc/classes/MultiDirHandler.html +198 -0
- data/doc/rdoc/classes/MultiDirHandler.src/M000001.html +20 -0
- data/doc/rdoc/classes/MultiDirHandler.src/M000002.html +28 -0
- data/doc/rdoc/classes/MultiDirHandler.src/M000003.html +22 -0
- data/doc/rdoc/classes/Net.html +119 -0
- data/doc/rdoc/classes/Net/An.html +114 -0
- data/doc/rdoc/classes/Net/An/HTTP.html +137 -0
- data/doc/rdoc/classes/Net/An/HTTP.src/M000087.html +17 -0
- data/doc/rdoc/classes/Net/An/IORequest.html +139 -0
- data/doc/rdoc/classes/Net/An/IORequest.src/M000088.html +17 -0
- data/doc/rdoc/classes/Net/An/IOResponse.html +139 -0
- data/doc/rdoc/classes/Net/An/IOResponse.src/M000085.html +17 -0
- data/doc/rdoc/classes/Net/An/IOSocket.html +137 -0
- data/doc/rdoc/classes/Net/An/IOSocket.src/M000086.html +17 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +168 -0
- data/doc/rdoc/files/LICENSE.html +605 -0
- data/doc/rdoc/files/README.html +361 -0
- data/doc/rdoc/files/lib/esi/cache_rb.html +113 -0
- data/doc/rdoc/files/lib/esi/config_rb.html +108 -0
- data/doc/rdoc/files/lib/esi/dispatcher_rb.html +109 -0
- data/doc/rdoc/files/lib/esi/handler_rb.html +121 -0
- data/doc/rdoc/files/lib/esi/invalidator_rb.html +117 -0
- data/doc/rdoc/files/lib/esi/logger_rb.html +108 -0
- data/doc/rdoc/files/lib/esi/router_rb.html +101 -0
- data/doc/rdoc/files/lib/esi/tag/attempt_rb.html +101 -0
- data/doc/rdoc/files/lib/esi/tag/base_rb.html +108 -0
- data/doc/rdoc/files/lib/esi/tag/except_rb.html +101 -0
- data/doc/rdoc/files/lib/esi/tag/include_rb.html +109 -0
- data/doc/rdoc/files/lib/esi/tag/invalidate_rb.html +109 -0
- data/doc/rdoc/files/lib/esi/tag/try_rb.html +108 -0
- data/doc/rdoc/files/lib/multi_dirhandler_rb.html +109 -0
- data/doc/rdoc/files/lib/net/ahttp_rb.html +109 -0
- data/doc/rdoc/fr_class_index.html +55 -0
- data/doc/rdoc/fr_file_index.html +44 -0
- data/doc/rdoc/fr_method_index.html +114 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/ext/esi/esi_parser.c +36 -156
- data/ext/esi/test/parser.c +42 -43
- data/ext/esi/test1.rb +2 -2
- data/lib/esi/cache.rb +83 -72
- data/lib/esi/handler.rb +5 -20
- data/lib/multi_dirhandler.rb +13 -0
- data/lib/net/ahttp.rb +36 -0
- data/test/integration/handler_test.rb +1 -1
- metadata +222 -45
- data/test/unit/sample.html +0 -21
@@ -0,0 +1,20 @@
|
|
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
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (ESI::Tag::Include)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/tag/include.rb, line 67</span>
|
14
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">headers</span>,<span class="ruby-identifier">http_params</span>,<span class="ruby-identifier">name</span>,<span class="ruby-identifier">attrs</span>,<span class="ruby-identifier">cache</span>)
|
15
|
+
68: <span class="ruby-keyword kw">super</span>
|
16
|
+
69: <span class="ruby-ivar">@depth</span> = <span class="ruby-value">0</span>
|
17
|
+
70: <span class="ruby-ivar">@max_depth</span> = <span class="ruby-value">3</span>
|
18
|
+
71: <span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>parse_fragment? (ESI::Tag::Include)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/tag/include.rb, line 73</span>
|
14
|
+
73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_fragment?</span>
|
15
|
+
74: <span class="ruby-ivar">@depth</span> <span class="ruby-operator"><=</span> <span class="ruby-ivar">@max_depth</span>
|
16
|
+
75: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,125 @@
|
|
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
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>close (ESI::Tag::Include)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/tag/include.rb, line 77</span>
|
14
|
+
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>( <span class="ruby-identifier">output</span>, <span class="ruby-identifier">options</span> = {} )
|
15
|
+
78: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">output</span>)
|
16
|
+
79:
|
17
|
+
80: <span class="ruby-identifier">raise_on_error</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:raise</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
18
|
+
81: <span class="ruby-identifier">ir</span> = <span class="ruby-constant">IncludeRequest</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@http_params</span>)
|
19
|
+
82:
|
20
|
+
83: <span class="ruby-identifier">src</span> = <span class="ruby-ivar">@router</span>.<span class="ruby-identifier">url_for</span>(<span class="ruby-identifier">prepare_url_vars</span>(<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">"src"</span>]))
|
21
|
+
84: <span class="ruby-identifier">alt</span> = <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'alt'</span>]
|
22
|
+
85: <span class="ruby-identifier">alt</span> = <span class="ruby-ivar">@router</span>.<span class="ruby-identifier">url_for</span>(<span class="ruby-identifier">prepare_url_vars</span>(<span class="ruby-identifier">alt</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">alt</span>
|
23
|
+
86:
|
24
|
+
87: <span class="ruby-identifier">parser</span> = <span class="ruby-keyword kw">nil</span>
|
25
|
+
88:
|
26
|
+
89: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parse_fragment?</span>
|
27
|
+
90: <span class="ruby-identifier">parser</span> = <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">CParser</span>.<span class="ruby-identifier">new</span>
|
28
|
+
91: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">output</span> = <span class="ruby-identifier">output</span>
|
29
|
+
92: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">depth</span> = (<span class="ruby-ivar">@depth</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>)
|
30
|
+
93:
|
31
|
+
94: <span class="ruby-comment cmt"># NOTE: really bad things happen if we attempt to copy the closure from the main parser</span>
|
32
|
+
95: <span class="ruby-comment cmt"># in esi/handler.rb</span>
|
33
|
+
96:
|
34
|
+
97: <span class="ruby-comment cmt"># handle start tags</span>
|
35
|
+
98: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">start_tag_handler</span> <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">tag_name</span>, <span class="ruby-identifier">attrs</span><span class="ruby-operator">|</span>
|
36
|
+
99: <span class="ruby-identifier">tag</span> = <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">Tag</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">create</span>( <span class="ruby-ivar">@router</span>,
|
37
|
+
100: <span class="ruby-ivar">@headers</span>,
|
38
|
+
101: <span class="ruby-ivar">@http_params</span>,
|
39
|
+
102: <span class="ruby-identifier">tag_name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/esi:/</span>,<span class="ruby-value str">''</span>),
|
40
|
+
103: <span class="ruby-identifier">attrs</span>,
|
41
|
+
104: <span class="ruby-ivar">@cache</span> )
|
42
|
+
105: <span class="ruby-comment cmt"># set the tag depth</span>
|
43
|
+
106: <span class="ruby-identifier">tag</span>.<span class="ruby-identifier">depth</span> = (<span class="ruby-ivar">@depth</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tag</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:depth=</span>)
|
44
|
+
107: <span class="ruby-identifier">tag</span>.<span class="ruby-identifier">max_depth</span> = <span class="ruby-ivar">@max_depth</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tag</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:max_depth=</span>)
|
45
|
+
108:
|
46
|
+
109: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span>
|
47
|
+
110: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span>.<span class="ruby-identifier">add_child</span>(<span class="ruby-identifier">tag</span>)
|
48
|
+
111: <span class="ruby-keyword kw">else</span>
|
49
|
+
112: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span> = <span class="ruby-identifier">tag</span>
|
50
|
+
113: <span class="ruby-keyword kw">end</span>
|
51
|
+
114: <span class="ruby-keyword kw">end</span>
|
52
|
+
115:
|
53
|
+
116: <span class="ruby-comment cmt"># handle end tags</span>
|
54
|
+
117: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">end_tag_handler</span> <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">tag_name</span><span class="ruby-operator">|</span>
|
55
|
+
118: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag_name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/esi:/</span>,<span class="ruby-value str">''</span>)
|
56
|
+
119: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span>.<span class="ruby-identifier">close</span>(<span class="ruby-identifier">parser</span>.<span class="ruby-identifier">output</span>)
|
57
|
+
120: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span> = <span class="ruby-keyword kw">nil</span>
|
58
|
+
121: <span class="ruby-keyword kw">else</span>
|
59
|
+
122: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">esi_tag</span>.<span class="ruby-identifier">close_child</span>(<span class="ruby-identifier">parser</span>.<span class="ruby-identifier">output</span>,<span class="ruby-identifier">tag_name</span>)
|
60
|
+
123: <span class="ruby-keyword kw">end</span>
|
61
|
+
124: <span class="ruby-keyword kw">end</span>
|
62
|
+
125:
|
63
|
+
126: <span class="ruby-keyword kw">end</span>
|
64
|
+
127:
|
65
|
+
128:
|
66
|
+
129: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">cached?</span>( <span class="ruby-identifier">src</span>, <span class="ruby-ivar">@http_params</span> )
|
67
|
+
130: <span class="ruby-identifier">cached_fragment</span> = <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">get</span>( <span class="ruby-identifier">src</span>, <span class="ruby-ivar">@headers</span> ).<span class="ruby-identifier">body</span>
|
68
|
+
131: <span class="ruby-identifier">log_request</span> <span class="ruby-value str">"C"</span>
|
69
|
+
132: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parse_fragment?</span>
|
70
|
+
133:
|
71
|
+
134: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">process</span> <span class="ruby-identifier">cached_fragment</span>
|
72
|
+
135: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">finish</span>
|
73
|
+
136:
|
74
|
+
137: <span class="ruby-keyword kw">else</span>
|
75
|
+
138: <span class="ruby-identifier">output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">cached_fragment</span>
|
76
|
+
139: <span class="ruby-keyword kw">end</span>
|
77
|
+
140:
|
78
|
+
141: <span class="ruby-keyword kw">else</span>
|
79
|
+
142:
|
80
|
+
143: <span class="ruby-identifier">ir</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">src</span>, <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'timeout'</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">alt</span> ) <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">status</span>,<span class="ruby-identifier">response</span>,<span class="ruby-identifier">uri</span><span class="ruby-operator">|</span>
|
81
|
+
144: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span>
|
82
|
+
145: <span class="ruby-comment cmt"># NOTE: it's important that we cache the unprocessed markup, because we need to </span>
|
83
|
+
146: <span class="ruby-comment cmt"># reprocess the esi:include vars even for cached content, this way we can have cached content</span>
|
84
|
+
147: <span class="ruby-comment cmt"># with HTTP_COOKIE vars and avoid re-requesting content</span>
|
85
|
+
148: <span class="ruby-identifier">log_request</span> <span class="ruby-value str">"R"</span>
|
86
|
+
149: <span class="ruby-identifier">cache_buffer</span> = <span class="ruby-value str">""</span>
|
87
|
+
150: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">read_body</span> <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
88
|
+
151: <span class="ruby-identifier">cache_buffer</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>
|
89
|
+
152: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parse_fragment?</span>
|
90
|
+
153: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">process</span> <span class="ruby-identifier">s</span>
|
91
|
+
154: <span class="ruby-keyword kw">else</span>
|
92
|
+
155: <span class="ruby-identifier">output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>
|
93
|
+
156: <span class="ruby-keyword kw">end</span>
|
94
|
+
157: <span class="ruby-keyword kw">end</span>
|
95
|
+
158:
|
96
|
+
159: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">finish</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parse_fragment?</span>
|
97
|
+
160:
|
98
|
+
161: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">uri</span> <span class="ruby-comment cmt"># these won't be equal if the fragment followed a redirect or used the alt condition</span>
|
99
|
+
162: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>
|
100
|
+
163: <span class="ruby-identifier">request_uri</span> = <span class="ruby-node">"#{uri.scheme}://#{uri.host}:#{uri.port}#{uri.path}?#{uri.query}"</span>
|
101
|
+
164: <span class="ruby-keyword kw">else</span>
|
102
|
+
165: <span class="ruby-identifier">request_uri</span> = <span class="ruby-node">"#{uri.scheme}://#{uri.host}:#{uri.port}#{uri.path}"</span>
|
103
|
+
166: <span class="ruby-keyword kw">end</span>
|
104
|
+
167: <span class="ruby-keyword kw">else</span>
|
105
|
+
168: <span class="ruby-identifier">request_uri</span> = <span class="ruby-identifier">src</span>
|
106
|
+
169: <span class="ruby-keyword kw">end</span>
|
107
|
+
170:
|
108
|
+
171: <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">put</span>(<span class="ruby-identifier">request_uri</span>, <span class="ruby-ivar">@http_params</span>, <span class="ruby-value">600</span>, <span class="ruby-identifier">cache_buffer</span> )
|
109
|
+
172:
|
110
|
+
173: <span class="ruby-keyword kw">else</span>
|
111
|
+
174: <span class="ruby-comment cmt"># error/ check if the include has an onerror specifier</span>
|
112
|
+
175: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'onerror'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'continue'</span>
|
113
|
+
176: <span class="ruby-comment cmt"># response is an IncludeRequest::Error</span>
|
114
|
+
177: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">message</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">raise_on_error</span>
|
115
|
+
178: <span class="ruby-comment cmt"># stop processing and return the error object</span>
|
116
|
+
179: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
117
|
+
180: <span class="ruby-keyword kw">end</span>
|
118
|
+
181: <span class="ruby-keyword kw">end</span>
|
119
|
+
182: <span class="ruby-keyword kw">end</span>
|
120
|
+
183:
|
121
|
+
184: <span class="ruby-identifier">parser</span> = <span class="ruby-keyword kw">nil</span>
|
122
|
+
185:
|
123
|
+
186: <span class="ruby-keyword kw">end</span></pre>
|
124
|
+
</body>
|
125
|
+
</html>
|
@@ -0,0 +1,199 @@
|
|
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
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: ESI::Tag::IncludeRequest</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">ESI::Tag::IncludeRequest</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/esi/tag/include_rb.html">
|
59
|
+
lib/esi/tag/include.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
ir = <a href="IncludeRequest.html#M000014">IncludeRequest.new</a>(
|
84
|
+
{‘header1’=>’value1’} )
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
ir.request( ’/fragment’ ) do|status,response|
|
88
|
+
</p>
|
89
|
+
<pre>
|
90
|
+
if status
|
91
|
+
response.read_body do|str|
|
92
|
+
end
|
93
|
+
else
|
94
|
+
# error case
|
95
|
+
end
|
96
|
+
</pre>
|
97
|
+
<p>
|
98
|
+
end
|
99
|
+
</p>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<div id="method-list">
|
107
|
+
<h3 class="section-bar">Methods</h3>
|
108
|
+
|
109
|
+
<div class="name-list">
|
110
|
+
<a href="#M000014">new</a>
|
111
|
+
<a href="#M000015">request</a>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
<!-- if includes -->
|
119
|
+
|
120
|
+
<div id="section">
|
121
|
+
|
122
|
+
<div id="class-list">
|
123
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
124
|
+
|
125
|
+
Class <a href="IncludeRequest/Error.html" class="link">ESI::Tag::IncludeRequest::Error</a><br />
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<div id="attribute-list">
|
133
|
+
<h3 class="section-bar">Attributes</h3>
|
134
|
+
|
135
|
+
<div class="name-list">
|
136
|
+
<table>
|
137
|
+
<tr class="top-aligned-row context-row">
|
138
|
+
<td class="context-item-name">exception</td>
|
139
|
+
<td class="context-item-value"> [R] </td>
|
140
|
+
<td class="context-item-desc"></td>
|
141
|
+
</tr>
|
142
|
+
<tr class="top-aligned-row context-row">
|
143
|
+
<td class="context-item-name">overflow_index</td>
|
144
|
+
<td class="context-item-value"> [R] </td>
|
145
|
+
<td class="context-item-desc"></td>
|
146
|
+
</tr>
|
147
|
+
</table>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<!-- if method_list -->
|
154
|
+
<div id="methods">
|
155
|
+
<h3 class="section-bar">Public Class methods</h3>
|
156
|
+
|
157
|
+
<div id="method-M000014" class="method-detail">
|
158
|
+
<a name="M000014"></a>
|
159
|
+
|
160
|
+
<div class="method-heading">
|
161
|
+
<a href="IncludeRequest.src/M000014.html" target="Code" class="method-signature"
|
162
|
+
onclick="popupCode('IncludeRequest.src/M000014.html');return false;">
|
163
|
+
<span class="method-name">new</span><span class="method-args">(forward_headers)</span>
|
164
|
+
</a>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<div class="method-description">
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
172
|
+
|
173
|
+
<div id="method-M000015" class="method-detail">
|
174
|
+
<a name="M000015"></a>
|
175
|
+
|
176
|
+
<div class="method-heading">
|
177
|
+
<a href="IncludeRequest.src/M000015.html" target="Code" class="method-signature"
|
178
|
+
onclick="popupCode('IncludeRequest.src/M000015.html');return false;">
|
179
|
+
<span class="method-name">request</span><span class="method-args">(uri, timeout = 1, alt_failover=nil, follow_limit=3) {|true, response, uri| ...}</span>
|
180
|
+
</a>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div class="method-description">
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
|
188
|
+
</div>
|
189
|
+
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
<div id="validator-badges">
|
195
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
</body>
|
199
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (ESI::Tag::IncludeRequest)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/tag/include.rb, line 30</span>
|
14
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">forward_headers</span>)
|
15
|
+
31: <span class="ruby-ivar">@headers</span> = <span class="ruby-identifier">forward_headers</span>
|
16
|
+
32: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
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
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>request (ESI::Tag::IncludeRequest)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/tag/include.rb, line 34</span>
|
14
|
+
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">timeout</span> = <span class="ruby-value">1</span>, <span class="ruby-identifier">alt_failover</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">follow_limit</span>=<span class="ruby-value">3</span>)
|
15
|
+
35: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
16
|
+
36: <span class="ruby-identifier">http</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>)
|
17
|
+
37: <span class="ruby-identifier">http</span>.<span class="ruby-identifier">read_timeout</span> = <span class="ruby-identifier">timeout</span>
|
18
|
+
38: <span class="ruby-identifier">http</span>.<span class="ruby-identifier">get2</span>( <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-ivar">@headers</span> ) <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">response</span><span class="ruby-operator">|</span>
|
19
|
+
39: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">response</span>
|
20
|
+
40: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPSuccess</span>
|
21
|
+
41: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">response</span>, <span class="ruby-identifier">uri</span>
|
22
|
+
42: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPRedirection</span>
|
23
|
+
43: <span class="ruby-identifier">ir</span> = <span class="ruby-constant">IncludeRequest</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@headers</span>)
|
24
|
+
44: <span class="ruby-identifier">ir</span>.<span class="ruby-identifier">request</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">response</span>[<span class="ruby-value str">'location'</span>]), <span class="ruby-identifier">timeout</span>, <span class="ruby-identifier">alt_failover</span>, <span class="ruby-identifier">follow_limit</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
|
25
|
+
45: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span>, <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">response</span>[<span class="ruby-value str">'location'</span>])
|
26
|
+
46: <span class="ruby-keyword kw">end</span>
|
27
|
+
47: <span class="ruby-keyword kw">else</span>
|
28
|
+
48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">alt_failover</span>
|
29
|
+
49: <span class="ruby-identifier">ir</span> = <span class="ruby-constant">IncludeRequest</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@headers</span>)
|
30
|
+
50: <span class="ruby-identifier">ir</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">alt_failover</span>, <span class="ruby-identifier">timeout</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">follow_limit</span>) <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
|
31
|
+
51: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">s</span>, <span class="ruby-identifier">r</span>, <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">alt_failover</span>)
|
32
|
+
52: <span class="ruby-keyword kw">end</span>
|
33
|
+
53: <span class="ruby-keyword kw">else</span>
|
34
|
+
54: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-constant">Error</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Failed to request fragment: #{uri.scheme}://#{uri.host}:#{uri.port}#{uri.path}"</span>, <span class="ruby-identifier">response</span>), <span class="ruby-identifier">uri</span>
|
35
|
+
55: <span class="ruby-keyword kw">end</span>
|
36
|
+
56: <span class="ruby-keyword kw">end</span>
|
37
|
+
57: <span class="ruby-keyword kw">end</span>
|
38
|
+
58: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
39
|
+
59: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-constant">Error</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Failed to request fragment: #{uri.scheme}://#{uri.host}:#{uri.port}#{uri.path}, timeout error: #{e.message}"</span>, <span class="ruby-keyword kw">nil</span>), <span class="ruby-identifier">uri</span>
|
40
|
+
60: <span class="ruby-keyword kw">end</span></pre>
|
41
|
+
</body>
|
42
|
+
</html>
|
@@ -0,0 +1,155 @@
|
|
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
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: ESI::Tag::IncludeRequest::Error</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">ESI::Tag::IncludeRequest::Error</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/esi/tag/include_rb.html">
|
59
|
+
lib/esi/tag/include.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000016">new</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
|
98
|
+
<div id="section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<div id="attribute-list">
|
105
|
+
<h3 class="section-bar">Attributes</h3>
|
106
|
+
|
107
|
+
<div class="name-list">
|
108
|
+
<table>
|
109
|
+
<tr class="top-aligned-row context-row">
|
110
|
+
<td class="context-item-name">message</td>
|
111
|
+
<td class="context-item-value"> [R] </td>
|
112
|
+
<td class="context-item-desc"></td>
|
113
|
+
</tr>
|
114
|
+
<tr class="top-aligned-row context-row">
|
115
|
+
<td class="context-item-name">response</td>
|
116
|
+
<td class="context-item-value"> [R] </td>
|
117
|
+
<td class="context-item-desc"></td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if method_list -->
|
126
|
+
<div id="methods">
|
127
|
+
<h3 class="section-bar">Public Class methods</h3>
|
128
|
+
|
129
|
+
<div id="method-M000016" class="method-detail">
|
130
|
+
<a name="M000016"></a>
|
131
|
+
|
132
|
+
<div class="method-heading">
|
133
|
+
<a href="Error.src/M000016.html" target="Code" class="method-signature"
|
134
|
+
onclick="popupCode('Error.src/M000016.html');return false;">
|
135
|
+
<span class="method-name">new</span><span class="method-args">(msg,response)</span>
|
136
|
+
</a>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
<div id="validator-badges">
|
151
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
</body>
|
155
|
+
</html>
|