Commits

Michael Granger  committed 4c64666

Update the examples.

  • Participants
  • Parent commits 8703559

Comments (0)

Files changed (3)

File History.rdoc

+== v0.33.0 [2012-10-02] Michael Granger <ged@FaerieMUD.org>
+
+- Implement deferred signal-handling for Mongrel2::Handler
+- Update the examples/
+- Squelch some of the noisier debug logging
+
+
 == v0.32.0 [2012-09-18] Michael Granger <ged@FaerieMUD.org>
 
 - Add a settings command for showing "expert" settings to m2sh.rb.

File data/mongrel2/bootstrap.html

 			<li><a href="/hello">Hello World</a> (<a href="/source/helloworld-handler.rb">source</a>) </li>
 			<li><a href="/async-upload">Async Upload Demo</a>
 				(<a href="/source/async-upload.rb">source</a>) </li>
-			<li><a href="/dump">Dump Request</a> (<a href="/source/request-dumper.rb">source</a>) </li>
-			<li><a href="/websock-test.html">Web Socket Test</a></li>
+			<li><a href="/dump">Dump Request</a> 
+				(<a href="/source/request-dumper.rb">source</a>) </li>
+			<li><a href="/websock-test.html">Web Socket Test</a> 
+				(<a href="/source/ws-echo.rb">source</a>)</li>
 		</ol>
 	</section>
 

File examples/async-upload.rb

 
 
 	### Mongrel2 async upload callback -- allow uploads to proceed.
-	def handle_upload_start( request )
+	def handle_async_upload_start( request )
 		self.log.info "Upload started: %s" % [ request.header.x_mongrel2_upload_start ]
 		return nil # Do nothing
 	end
 
 	### Regular request -- show the upload form.
 	def handle( request )
-		# If it's the 'upload started' notification, use that handler method
-		if request.upload_started?
-			return self.handle_upload_start( request )
-
 		# If it's a finished upload, use that handler method
-		elsif request.upload_done?
+		if request.upload_done?
 			return self.handle_upload_done( request )
 
 		else