Justin Richard's blog



Help

"Some of our requests are not timing out in the time specified in our mod_proxy settings in Apache."

This team's problem was later refined to the fact that these timeout settings were not being respected on all requests when the server hit a spike in load. The solution is to recompile Apache with the --with-mpm=worker option. The default option value is --with-mpm=prefork. With Apache compiled with the 'worker' value all requests respect the timeout settings.

"When using Rafael and jQuery together in our project our click handlers throw errors in IE 7 and 8"

After further investigation IE seems to keep propagating the click event even though it was handled. The following javascript was added only in IE browsers to make it behave like the other browsers.

if(document.attachEvent) {
  $(divContainingCanvas).find("*").click(function(event) {
    event.stopPropagation();
  });
}

Interesting

Modulr is a Ruby implementation of a CommonJS module that combines your multiple javascript files into a single file that is executed in dependency order. It does this by ordering the execution of your code by the require() method call. What's interesting is that you can collapse your NodeJS code into a single file to include in a browser and run Jasmine tests against. This is possible because NodeJS uses require() to link your dependent files together.

Justin RichardJustin Richard
Standup 2010.10.4 getting SWFUpload to work with Rails 3
edit Posted by Justin Richard on Monday October 04, 2010 at 02:10PM

Help

"We're trying to use SWFUpload in Rails 3 by using Rack middleware to rewrite the session cookie passed in via request param. In a Rails 2.3.x your Rack middleware could clobber the session cookie and reset it before it hits your main app. However, this isn't happening in Rails 3. Has anybody run into this before?"

The answer is that as of Rails 2.3.4, the session handler was moved to Rack middleware. So you need to make sure that your middleware manipulating the session is running before the Rails session middleware is run. You can do this with something like this:

config.middleware.insert_before(config.session_store, FlashSessionCookieMiddleware)

Brian Racer has a good description of getting SWFUpload working with rails 2.3.4