mongrel 0.3.12.4 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +44 -33
- data/bin/mongrel_rails +67 -34
- data/doc/rdoc/classes/IO.html +10 -10
- data/doc/rdoc/classes/IO.src/{M000005.html → M000001.html} +5 -5
- data/doc/rdoc/classes/IO.src/{M000006.html → M000002.html} +5 -5
- data/doc/rdoc/classes/Kernel.html +10 -10
- data/doc/rdoc/classes/Kernel.src/{M000025.html → M000020.html} +5 -5
- data/doc/rdoc/classes/Kernel.src/M000021.html +23 -0
- data/doc/rdoc/classes/Mongrel.html +25 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +383 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +11 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +34 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +21 -6
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000093.html → M000099.html} +13 -13
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000094.html → M000100.html} +11 -11
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000095.html → M000101.html} +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +18 -0
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000084.html → CGIWrapper.src/M000103.html} +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/M000046.html +22 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/{M000049.html → M000047.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +51 -0
- data/doc/rdoc/classes/Mongrel/Command.html +13 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +95 -50
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +24 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +42 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +9 -28
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +11 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +20 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000040.html → M000038.html} +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +37 -7
- data/doc/rdoc/classes/Mongrel/Configurator.html +651 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +16 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +18 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +7 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +7 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +10 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +5 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +21 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -15
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +17 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +20 -33
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +24 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +19 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +22 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +25 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +35 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +33 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +39 -7
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +181 -0
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000094.html +19 -0
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000095.html +28 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.html +48 -33
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +21 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +43 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +29 -7
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +50 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +26 -27
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +5 -38
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +171 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000116.html → M000125.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000117.html → M000126.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +185 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000072.html → M000069.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000073.html → M000070.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +170 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000074.html → M000075.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +20 -10
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/{M000027.html → M000022.html} +5 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/{M000028.html → M000023.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpParser.html +41 -36
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000056.html → M000049.html} +6 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000057.html → M000050.html} +7 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +37 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +5 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +6 -22
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +6 -5
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +239 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000130.html +52 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000119.html → M000131.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000120.html → M000132.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000121.html → M000133.html} +18 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +439 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +12 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +7 -12
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -10
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +8 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +20 -0
- data/doc/rdoc/classes/Mongrel/{HttpServer.src/M000069.html → HttpResponse.src/M000085.html} +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +20 -0
- data/doc/rdoc/classes/Mongrel/{Configurator.src/M000101.html → HttpResponse.src/M000087.html} +5 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.html +68 -59
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +25 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +83 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +13 -11
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +50 -53
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +21 -11
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +5 -47
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +9 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +16 -16
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +39 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/{M000043.html → M000041.html} +11 -11
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +13 -22
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +17 -17
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +51 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +10 -9
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +211 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000127.html +24 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000128.html +24 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000129.html +18 -0
- data/doc/rdoc/classes/{Class.html → Mongrel/StatusHandler.html} +42 -45
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +18 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +24 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +42 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +20 -0
- data/doc/rdoc/classes/Mongrel/StopServer.html +117 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +314 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +5 -23
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +5 -70
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000086.html → M000090.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000087.html → M000091.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +83 -0
- data/doc/rdoc/classes/MongrelDbg.html +25 -25
- data/doc/rdoc/classes/MongrelDbg.src/{M000020.html → M000015.html} +5 -5
- data/doc/rdoc/classes/MongrelDbg.src/{M000021.html → M000016.html} +6 -6
- data/doc/rdoc/classes/MongrelDbg.src/{M000022.html → M000017.html} +8 -8
- data/doc/rdoc/classes/MongrelDbg.src/{M000023.html → M000018.html} +7 -7
- data/doc/rdoc/classes/MongrelDbg.src/{M000024.html → M000019.html} +4 -4
- data/doc/rdoc/classes/ObjectTracker.html +10 -40
- data/doc/rdoc/classes/ObjectTracker.src/M000013.html +27 -0
- data/doc/rdoc/classes/ObjectTracker.src/M000014.html +44 -0
- data/doc/rdoc/classes/RequestLog.html +115 -0
- data/doc/rdoc/classes/RequestLog/Access.html +151 -0
- data/doc/rdoc/classes/RequestLog/Access.src/{M000122.html → M000134.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Files.html +144 -0
- data/doc/rdoc/classes/RequestLog/Files.src/{M000123.html → M000135.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.html +144 -0
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000124.html → M000137.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Params.html +144 -0
- data/doc/rdoc/classes/RequestLog/Params.src/{M000125.html → M000138.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.html +144 -0
- data/doc/rdoc/classes/RequestLog/Threads.src/M000136.html +34 -0
- data/doc/rdoc/classes/Stats.html +54 -36
- data/doc/rdoc/classes/Stats.src/{M000013.html → M000005.html} +6 -5
- data/doc/rdoc/classes/Stats.src/M000006.html +23 -0
- data/doc/rdoc/classes/Stats.src/M000007.html +26 -0
- data/doc/rdoc/classes/Stats.src/M000008.html +18 -0
- data/doc/rdoc/classes/Stats.src/M000009.html +5 -6
- data/doc/rdoc/classes/Stats.src/M000010.html +5 -10
- data/doc/rdoc/classes/Stats.src/M000011.html +10 -13
- data/doc/rdoc/classes/Stats.src/M000012.html +7 -5
- data/doc/rdoc/classes/TCPServer.html +9 -9
- data/doc/rdoc/classes/TCPServer.src/M000003.html +19 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +1 -1
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +1 -1
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/camping_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/command_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +3 -3
- data/doc/rdoc/files/lib/mongrel/init_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +21 -10
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +23 -4
- data/doc/rdoc/files/lib/mongrel_rb.html +33 -1
- data/doc/rdoc/fr_class_index.html +65 -0
- data/doc/rdoc/fr_file_index.html +40 -0
- data/doc/rdoc/fr_method_index.html +164 -0
- data/doc/rdoc/index.html +24 -0
- data/examples/camping/blog.rb +1 -1
- data/examples/camping/tepee.rb +4 -3
- data/examples/simpletest.rb +15 -14
- data/ext/http11/http11.c +52 -18
- data/ext/http11/http11_parser.c +194 -177
- data/ext/http11/http11_parser.h +23 -5
- data/lib/mongrel.rb +295 -134
- data/lib/mongrel/camping.rb +48 -6
- data/lib/mongrel/cgi.rb +20 -2
- data/lib/mongrel/command.rb +76 -27
- data/lib/mongrel/debug.rb +42 -13
- data/lib/mongrel/handlers.rb +218 -59
- data/lib/mongrel/init.rb +18 -0
- data/lib/mongrel/rails.rb +61 -44
- data/lib/mongrel/stats.rb +30 -2
- data/lib/mongrel/tcphack.rb +18 -0
- data/setup.rb +799 -574
- data/test/mime.yaml +3 -0
- data/test/mongrel.conf +1 -0
- data/test/test_command.rb +101 -0
- data/test/test_conditional.rb +124 -0
- data/test/test_configurator.rb +56 -22
- data/test/test_debug.rb +18 -2
- data/test/test_handlers.rb +105 -0
- data/test/test_http11.rb +27 -9
- data/test/test_response.rb +38 -0
- data/test/test_stats.rb +21 -2
- data/test/test_uriclassifier.rb +18 -0
- data/test/test_ws.rb +105 -19
- data/test/testhelp.rb +36 -0
- data/tools/rakehelp.rb +52 -46
- data/tools/trickletest.rb +37 -0
- metadata +127 -76
- data/doc/rdoc/classes/Class.src/M000001.html +0 -24
- data/doc/rdoc/classes/Class.src/M000002.html +0 -62
- data/doc/rdoc/classes/Class.src/M000003.html +0 -21
- data/doc/rdoc/classes/Class.src/M000004.html +0 -20
- data/doc/rdoc/classes/Kernel.src/M000026.html +0 -25
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000090.html +0 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000091.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000092.html +0 -34
- data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +0 -22
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +0 -27
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +0 -46
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +0 -24
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +0 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +0 -32
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +0 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +0 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +0 -40
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000118.html +0 -28
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +0 -26
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +0 -22
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +0 -18
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +0 -32
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +0 -48
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +0 -23
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000085.html +0 -18
- data/doc/rdoc/classes/ObjectTracker.src/M000016.html +0 -22
- data/doc/rdoc/classes/ObjectTracker.src/M000017.html +0 -18
- data/doc/rdoc/classes/ObjectTracker.src/M000018.html +0 -18
- data/doc/rdoc/classes/ObjectTracker.src/M000019.html +0 -44
- data/doc/rdoc/classes/Stats.src/M000014.html +0 -19
- data/doc/rdoc/classes/Stats.src/M000015.html +0 -20
- data/doc/rdoc/classes/TCPServer.src/M000007.html +0 -19
- data/lib/mongrel/#rails.rb# +0 -178
@@ -10,9 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 51</span>
|
14
|
+
51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
|
15
|
+
52: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
16
|
+
53: <span class="ruby-ivar">@header_only</span> = <span class="ruby-keyword kw">false</span>
|
17
|
+
54: <span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -10,8 +10,8 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line
|
14
|
-
|
15
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 56</span>
|
14
|
+
56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
|
15
|
+
57: <span class="ruby-keyword kw">end</span></pre>
|
16
16
|
</body>
|
17
17
|
</html>
|
@@ -86,13 +86,13 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
89
|
+
<a href="#M000053">error?</a>
|
90
|
+
<a href="#M000052">execute</a>
|
91
|
+
<a href="#M000051">finish</a>
|
92
|
+
<a href="#M000054">finished?</a>
|
93
|
+
<a href="#M000049">new</a>
|
94
|
+
<a href="#M000055">nread</a>
|
95
|
+
<a href="#M000050">reset</a>
|
96
96
|
</div>
|
97
97
|
</div>
|
98
98
|
|
@@ -114,12 +114,12 @@
|
|
114
114
|
<div id="methods">
|
115
115
|
<h3 class="section-bar">Public Class methods</h3>
|
116
116
|
|
117
|
-
<div id="method-
|
118
|
-
<a name="
|
117
|
+
<div id="method-M000049" class="method-detail">
|
118
|
+
<a name="M000049"></a>
|
119
119
|
|
120
120
|
<div class="method-heading">
|
121
|
-
<a href="HttpParser.src/
|
122
|
-
onclick="popupCode('HttpParser.src/
|
121
|
+
<a href="HttpParser.src/M000049.html" target="Code" class="method-signature"
|
122
|
+
onclick="popupCode('HttpParser.src/M000049.html');return false;">
|
123
123
|
<span class="method-name">parser.new → parser<br />
|
124
124
|
</span>
|
125
125
|
</a>
|
@@ -134,12 +134,12 @@ Creates a new parser.
|
|
134
134
|
|
135
135
|
<h3 class="section-bar">Public Instance methods</h3>
|
136
136
|
|
137
|
-
<div id="method-
|
138
|
-
<a name="
|
137
|
+
<div id="method-M000053" class="method-detail">
|
138
|
+
<a name="M000053"></a>
|
139
139
|
|
140
140
|
<div class="method-heading">
|
141
|
-
<a href="HttpParser.src/
|
142
|
-
onclick="popupCode('HttpParser.src/
|
141
|
+
<a href="HttpParser.src/M000053.html" target="Code" class="method-signature"
|
142
|
+
onclick="popupCode('HttpParser.src/M000053.html');return false;">
|
143
143
|
<span class="method-name">parser.error? → true/false<br />
|
144
144
|
</span>
|
145
145
|
</a>
|
@@ -152,13 +152,13 @@ Tells you whether the parser is in an error state.
|
|
152
152
|
</div>
|
153
153
|
</div>
|
154
154
|
|
155
|
-
<div id="method-
|
156
|
-
<a name="
|
155
|
+
<div id="method-M000052" class="method-detail">
|
156
|
+
<a name="M000052"></a>
|
157
157
|
|
158
158
|
<div class="method-heading">
|
159
|
-
<a href="HttpParser.src/
|
160
|
-
onclick="popupCode('HttpParser.src/
|
161
|
-
<span class="method-name">parser.execute(req_hash, data) → Integer<br />
|
159
|
+
<a href="HttpParser.src/M000052.html" target="Code" class="method-signature"
|
160
|
+
onclick="popupCode('HttpParser.src/M000052.html');return false;">
|
161
|
+
<span class="method-name">parser.execute(req_hash, data, start) → Integer<br />
|
162
162
|
</span>
|
163
163
|
</a>
|
164
164
|
</div>
|
@@ -176,16 +176,21 @@ This function now throws an exception when there is a parsing error. This
|
|
176
176
|
makes the logic for working with the parser much easier. You can still test
|
177
177
|
for an error, but now you need to wrap the parser with an exception
|
178
178
|
handling block.
|
179
|
+
</p>
|
180
|
+
<p>
|
181
|
+
The third argument allows for parsing a partial request and then continuing
|
182
|
+
the parsing from that position. It needs all of the original data as well
|
183
|
+
so you have to append to the data buffer as you read.
|
179
184
|
</p>
|
180
185
|
</div>
|
181
186
|
</div>
|
182
187
|
|
183
|
-
<div id="method-
|
184
|
-
<a name="
|
188
|
+
<div id="method-M000051" class="method-detail">
|
189
|
+
<a name="M000051"></a>
|
185
190
|
|
186
191
|
<div class="method-heading">
|
187
|
-
<a href="HttpParser.src/
|
188
|
-
onclick="popupCode('HttpParser.src/
|
192
|
+
<a href="HttpParser.src/M000051.html" target="Code" class="method-signature"
|
193
|
+
onclick="popupCode('HttpParser.src/M000051.html');return false;">
|
189
194
|
<span class="method-name">parser.finish → true/false<br />
|
190
195
|
</span>
|
191
196
|
</a>
|
@@ -199,12 +204,12 @@ You should call reset after finish it or bad things will happen.
|
|
199
204
|
</div>
|
200
205
|
</div>
|
201
206
|
|
202
|
-
<div id="method-
|
203
|
-
<a name="
|
207
|
+
<div id="method-M000054" class="method-detail">
|
208
|
+
<a name="M000054"></a>
|
204
209
|
|
205
210
|
<div class="method-heading">
|
206
|
-
<a href="HttpParser.src/
|
207
|
-
onclick="popupCode('HttpParser.src/
|
211
|
+
<a href="HttpParser.src/M000054.html" target="Code" class="method-signature"
|
212
|
+
onclick="popupCode('HttpParser.src/M000054.html');return false;">
|
208
213
|
<span class="method-name">parser.finished? → true/false<br />
|
209
214
|
</span>
|
210
215
|
</a>
|
@@ -217,12 +222,12 @@ Tells you whether the parser is finished or not and in a good state.
|
|
217
222
|
</div>
|
218
223
|
</div>
|
219
224
|
|
220
|
-
<div id="method-
|
221
|
-
<a name="
|
225
|
+
<div id="method-M000055" class="method-detail">
|
226
|
+
<a name="M000055"></a>
|
222
227
|
|
223
228
|
<div class="method-heading">
|
224
|
-
<a href="HttpParser.src/
|
225
|
-
onclick="popupCode('HttpParser.src/
|
229
|
+
<a href="HttpParser.src/M000055.html" target="Code" class="method-signature"
|
230
|
+
onclick="popupCode('HttpParser.src/M000055.html');return false;">
|
226
231
|
<span class="method-name">parser.nread → Integer<br />
|
227
232
|
</span>
|
228
233
|
</a>
|
@@ -237,12 +242,12 @@ execute is called.
|
|
237
242
|
</div>
|
238
243
|
</div>
|
239
244
|
|
240
|
-
<div id="method-
|
241
|
-
<a name="
|
245
|
+
<div id="method-M000050" class="method-detail">
|
246
|
+
<a name="M000050"></a>
|
242
247
|
|
243
248
|
<div class="method-heading">
|
244
|
-
<a href="HttpParser.src/
|
245
|
-
onclick="popupCode('HttpParser.src/
|
249
|
+
<a href="HttpParser.src/M000050.html" target="Code" class="method-signature"
|
250
|
+
onclick="popupCode('HttpParser.src/M000050.html');return false;">
|
246
251
|
<span class="method-name">parser.reset → nil<br />
|
247
252
|
</span>
|
248
253
|
</a>
|
@@ -5,23 +5,24 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.new -> parser
|
16
16
|
*
|
17
|
-
*
|
17
|
+
* Creates a new parser.
|
18
18
|
*/
|
19
|
-
VALUE
|
19
|
+
VALUE HttpParser_init(VALUE self)
|
20
20
|
{
|
21
21
|
http_parser *http = NULL;
|
22
22
|
DATA_GET(self, http_parser, http);
|
23
|
+
http_parser_init(http);
|
23
24
|
|
24
|
-
return
|
25
|
+
return self;
|
25
26
|
}</pre>
|
26
27
|
</body>
|
27
28
|
</html>
|
@@ -5,24 +5,25 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>reset (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.reset -> nil
|
16
16
|
*
|
17
|
-
*
|
18
|
-
*
|
17
|
+
* Resets the parser to it's initial state so that you can reuse it
|
18
|
+
* rather than making new ones.
|
19
19
|
*/
|
20
|
-
VALUE
|
20
|
+
VALUE HttpParser_reset(VALUE self)
|
21
21
|
{
|
22
22
|
http_parser *http = NULL;
|
23
23
|
DATA_GET(self, http_parser, http);
|
24
|
+
http_parser_init(http);
|
24
25
|
|
25
|
-
return
|
26
|
+
return Qnil;
|
26
27
|
}</pre>
|
27
28
|
</body>
|
28
29
|
</html>
|
@@ -5,24 +5,25 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>finish (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.finish -> true/false
|
16
16
|
*
|
17
|
-
*
|
17
|
+
* Finishes a parser early which could put in a "good" or bad state.
|
18
|
+
* You should call reset after finish it or bad things will happen.
|
18
19
|
*/
|
19
|
-
VALUE
|
20
|
+
VALUE HttpParser_finish(VALUE self)
|
20
21
|
{
|
21
22
|
http_parser *http = NULL;
|
22
23
|
DATA_GET(self, http_parser, http);
|
23
|
-
|
24
|
+
http_parser_finish(http);
|
24
25
|
|
25
|
-
return
|
26
|
+
return http_parser_is_finished(http) ? Qtrue : Qfalse;
|
26
27
|
}</pre>
|
27
28
|
</body>
|
28
29
|
</html>
|
@@ -5,25 +5,55 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>execute (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.execute(req_hash, data, start) -> Integer
|
16
16
|
*
|
17
|
-
*
|
18
|
-
*
|
17
|
+
* Takes a Hash and a String of data, parses the String of data filling in the Hash
|
18
|
+
* returning an Integer to indicate how much of the data has been read. No matter
|
19
|
+
* what the return value, you should call HttpParser#finished? and HttpParser#error?
|
20
|
+
* to figure out if it's done parsing or there was an error.
|
21
|
+
*
|
22
|
+
* This function now throws an exception when there is a parsing error. This makes
|
23
|
+
* the logic for working with the parser much easier. You can still test for an
|
24
|
+
* error, but now you need to wrap the parser with an exception handling block.
|
25
|
+
*
|
26
|
+
* The third argument allows for parsing a partial request and then continuing
|
27
|
+
* the parsing from that position. It needs all of the original data as well
|
28
|
+
* so you have to append to the data buffer as you read.
|
19
29
|
*/
|
20
|
-
VALUE
|
30
|
+
VALUE HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
|
21
31
|
{
|
22
32
|
http_parser *http = NULL;
|
33
|
+
int from = 0;
|
34
|
+
char *dptr = NULL;
|
35
|
+
long dlen = 0;
|
36
|
+
|
23
37
|
DATA_GET(self, http_parser, http);
|
24
|
-
|
38
|
+
|
39
|
+
from = FIX2INT(start);
|
40
|
+
dptr = RSTRING(data)->ptr;
|
41
|
+
dlen = RSTRING(data)->len;
|
25
42
|
|
26
|
-
|
43
|
+
if(from >= dlen) {
|
44
|
+
rb_raise(eHttpParserError, "Requested start is after data buffer end.");
|
45
|
+
} else {
|
46
|
+
http->data = (void *)req_hash;
|
47
|
+
http_parser_execute(http, dptr, dlen, from);
|
48
|
+
|
49
|
+
VALIDATE_MAX_LENGTH(http_parser_nread(http), HEADER);
|
50
|
+
|
51
|
+
if(http_parser_has_error(http)) {
|
52
|
+
rb_raise(eHttpParserError, "Invalid HTTP format, parsing fails.");
|
53
|
+
} else {
|
54
|
+
return INT2FIX(http_parser_nread(http));
|
55
|
+
}
|
56
|
+
}
|
27
57
|
}</pre>
|
28
58
|
</body>
|
29
59
|
</html>
|
@@ -5,25 +5,23 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>error? (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.error? -> true/false
|
16
16
|
*
|
17
|
-
*
|
18
|
-
* You should call reset after finish it or bad things will happen.
|
17
|
+
* Tells you whether the parser is in an error state.
|
19
18
|
*/
|
20
|
-
VALUE
|
19
|
+
VALUE HttpParser_has_error(VALUE self)
|
21
20
|
{
|
22
21
|
http_parser *http = NULL;
|
23
22
|
DATA_GET(self, http_parser, http);
|
24
|
-
http_parser_finish(http);
|
25
23
|
|
26
|
-
return
|
24
|
+
return http_parser_has_error(http) ? Qtrue : Qfalse;
|
27
25
|
}</pre>
|
28
26
|
</body>
|
29
27
|
</html>
|
@@ -5,39 +5,23 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>finished? (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.finished? -> true/false
|
16
16
|
*
|
17
|
-
*
|
18
|
-
* returning an Integer to indicate how much of the data has been read. No matter
|
19
|
-
* what the return value, you should call HttpParser#finished? and HttpParser#error?
|
20
|
-
* to figure out if it's done parsing or there was an error.
|
21
|
-
*
|
22
|
-
* This function now throws an exception when there is a parsing error. This makes
|
23
|
-
* the logic for working with the parser much easier. You can still test for an
|
24
|
-
* error, but now you need to wrap the parser with an exception handling block.
|
17
|
+
* Tells you whether the parser is finished or not and in a good state.
|
25
18
|
*/
|
26
|
-
VALUE
|
19
|
+
VALUE HttpParser_is_finished(VALUE self)
|
27
20
|
{
|
28
21
|
http_parser *http = NULL;
|
29
22
|
DATA_GET(self, http_parser, http);
|
30
|
-
|
31
|
-
http
|
32
|
-
http_parser_execute(http, RSTRING(data)->ptr, RSTRING(data)->len);
|
33
|
-
|
34
|
-
VALIDATE_MAX_LENGTH(http_parser_nread(http), HEADER);
|
35
|
-
|
36
|
-
if(http_parser_has_error(http)) {
|
37
|
-
rb_raise(eHttpParserError, "Invalid HTTP format, parsing fails.");
|
38
|
-
} else {
|
39
|
-
return INT2FIX(http_parser_nread(http));
|
40
|
-
}
|
23
|
+
|
24
|
+
return http_parser_is_finished(http) ? Qtrue : Qfalse;
|
41
25
|
}</pre>
|
42
26
|
</body>
|
43
27
|
</html>
|
@@ -5,23 +5,24 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>nread (Mongrel::HttpParser)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
13
|
<pre>/**
|
14
14
|
* call-seq:
|
15
|
-
* parser.
|
15
|
+
* parser.nread -> Integer
|
16
16
|
*
|
17
|
-
*
|
17
|
+
* Returns the amount of data processed so far during this processing cycle. It is
|
18
|
+
* set to 0 on initialize or reset calls and is incremented each time execute is called.
|
18
19
|
*/
|
19
|
-
VALUE
|
20
|
+
VALUE HttpParser_nread(VALUE self)
|
20
21
|
{
|
21
22
|
http_parser *http = NULL;
|
22
23
|
DATA_GET(self, http_parser, http);
|
23
24
|
|
24
|
-
return
|
25
|
+
return INT2FIX(http->nread);
|
25
26
|
}</pre>
|
26
27
|
</body>
|
27
28
|
</html>
|
@@ -0,0 +1,239 @@
|
|
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: Mongrel::HttpRequest</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">Mongrel::HttpRequest</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/mongrel_rb.html">
|
59
|
+
lib/mongrel.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
|
+
When a handler is found for a registered URI then this class is constructed
|
84
|
+
and passed to your HttpHandler::process method. You should assume that
|
85
|
+
<b>one</b> handler processes all requests. Included in the <a
|
86
|
+
href="HttpRequest.html">HttpRequest</a> is a HttpRequest.params Hash that
|
87
|
+
matches common CGI params, and a HttpRequest.body which is a string
|
88
|
+
containing the request body (raw for now).
|
89
|
+
</p>
|
90
|
+
<p>
|
91
|
+
The HttpRequest.initialize method will convert any request that is larger
|
92
|
+
than Const::MAX_BODY into a Tempfile and use that as the body. Otherwise it
|
93
|
+
uses a StringIO object. To be safe, you should assume it works like a file.
|
94
|
+
</p>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div id="method-list">
|
102
|
+
<h3 class="section-bar">Methods</h3>
|
103
|
+
|
104
|
+
<div class="name-list">
|
105
|
+
<a href="#M000131">escape</a>
|
106
|
+
<a href="#M000130">new</a>
|
107
|
+
<a href="#M000133">query_parse</a>
|
108
|
+
<a href="#M000132">unescape</a>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
<!-- if includes -->
|
116
|
+
|
117
|
+
<div id="section">
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<div id="attribute-list">
|
124
|
+
<h3 class="section-bar">Attributes</h3>
|
125
|
+
|
126
|
+
<div class="name-list">
|
127
|
+
<table>
|
128
|
+
<tr class="top-aligned-row context-row">
|
129
|
+
<td class="context-item-name">body</td>
|
130
|
+
<td class="context-item-value"> [R] </td>
|
131
|
+
<td class="context-item-desc"></td>
|
132
|
+
</tr>
|
133
|
+
<tr class="top-aligned-row context-row">
|
134
|
+
<td class="context-item-name">params</td>
|
135
|
+
<td class="context-item-value"> [R] </td>
|
136
|
+
<td class="context-item-desc"></td>
|
137
|
+
</tr>
|
138
|
+
</table>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
<!-- if method_list -->
|
145
|
+
<div id="methods">
|
146
|
+
<h3 class="section-bar">Public Class methods</h3>
|
147
|
+
|
148
|
+
<div id="method-M000131" class="method-detail">
|
149
|
+
<a name="M000131"></a>
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<a href="HttpRequest.src/M000131.html" target="Code" class="method-signature"
|
153
|
+
onclick="popupCode('HttpRequest.src/M000131.html');return false;">
|
154
|
+
<span class="method-name">escape</span><span class="method-args">(s)</span>
|
155
|
+
</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
<p>
|
160
|
+
Performs URI escaping so that you can construct proper query strings
|
161
|
+
faster. Use this rather than the cgi.rb version since it’s faster.
|
162
|
+
(Stolen from <a href="Camping.html">Camping</a>).
|
163
|
+
</p>
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<div id="method-M000130" class="method-detail">
|
168
|
+
<a name="M000130"></a>
|
169
|
+
|
170
|
+
<div class="method-heading">
|
171
|
+
<a href="HttpRequest.src/M000130.html" target="Code" class="method-signature"
|
172
|
+
onclick="popupCode('HttpRequest.src/M000130.html');return false;">
|
173
|
+
<span class="method-name">new</span><span class="method-args">(params, initial_body, socket)</span>
|
174
|
+
</a>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<div class="method-description">
|
178
|
+
<p>
|
179
|
+
You don’t really call this. It’s made for you. Main thing it
|
180
|
+
does is hook up the params, and store any remaining body data into the
|
181
|
+
HttpRequest.body attribute.
|
182
|
+
</p>
|
183
|
+
<p>
|
184
|
+
TODO: Implement tempfile removal when the request is done.
|
185
|
+
</p>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<div id="method-M000133" class="method-detail">
|
190
|
+
<a name="M000133"></a>
|
191
|
+
|
192
|
+
<div class="method-heading">
|
193
|
+
<a href="HttpRequest.src/M000133.html" target="Code" class="method-signature"
|
194
|
+
onclick="popupCode('HttpRequest.src/M000133.html');return false;">
|
195
|
+
<span class="method-name">query_parse</span><span class="method-args">(qs, d = '&;')</span>
|
196
|
+
</a>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<div class="method-description">
|
200
|
+
<p>
|
201
|
+
Parses a query string by breaking it up at the ’&’ and
|
202
|
+
’;’ characters. You can also use this to parse cookies by
|
203
|
+
changing the characters used in the second parameter (which defaults to
|
204
|
+
’&;’.
|
205
|
+
</p>
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div id="method-M000132" class="method-detail">
|
210
|
+
<a name="M000132"></a>
|
211
|
+
|
212
|
+
<div class="method-heading">
|
213
|
+
<a href="HttpRequest.src/M000132.html" target="Code" class="method-signature"
|
214
|
+
onclick="popupCode('HttpRequest.src/M000132.html');return false;">
|
215
|
+
<span class="method-name">unescape</span><span class="method-args">(s)</span>
|
216
|
+
</a>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
<div class="method-description">
|
220
|
+
<p>
|
221
|
+
Unescapes a URI escaped string. (Stolen from <a
|
222
|
+
href="Camping.html">Camping</a>).
|
223
|
+
</p>
|
224
|
+
</div>
|
225
|
+
</div>
|
226
|
+
|
227
|
+
|
228
|
+
</div>
|
229
|
+
|
230
|
+
|
231
|
+
</div>
|
232
|
+
|
233
|
+
|
234
|
+
<div id="validator-badges">
|
235
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
</body>
|
239
|
+
</html>
|