Monthly Archives:

November 2008

Posted on November 17, 2008 by Richard Ziade

At Arc90, Our Customers Threaten To Fire Us Every Day

Nearly four years ago to this day, I put up a post on basement.org entitled U.S. Tech Workers: Wake Up. It's essentially a call to arms for technology professionals in the U.S. and other "advanced" (*cough*) societies:

There are some very bright and very hungry people out there that would love to replace the stereotypically stagnant American technology group. The outsourcing of routine and mundane tasks should be embraced by American tech workers. It should be perceived as a "freeing up" for Americans to do what we're known for: innovate. Instead, there's a groundswell of anger towards companies that outsource. This anger comes from an unhealthy place in my opinion. Tech workers in the U.S. need to be less concerned about outsourcing and more concerned with reinventing themselves as indispensable players in technology.

Continue reading "At Arc90, Our Customers Threaten To Fire Us Every Day" »

| Comments (0) | Technorati Tags :

Posted on November 11, 2008 by Michael Rehse

Enabling SSL on Windows with PHP and the Zend Framework

Ever tried to use HTTPS with PHP and the Zend Framework on Windows, but only received an error for all your troubles? Perhaps an error like:

    Unable to Connect to ssl://( your host name):443.
    Error #175113224: Unable to find the socket transport "ssl" - 
    did you forget to enable it when you configured PHP?

The problem lies in your version of OpenSSL and certain configuration parameters.

HTTPS relies on SSL to transport your data securely and PHP usually uses the OpenSSL implementation of SSL. Problems occur when your versions of OpenSSL are out of sync with each other.

The best option is to always keep ALL of your software 100% up-to-date at all times--but sometimes you are not able to do a full software update for one reason or another.

Continue reading "Enabling SSL on Windows with PHP and the Zend Framework" »

| Comments (0) | Technorati Tags :

Posted on November 7, 2008 by Avi Flax

CouchDB Tech Talk by Chris Anderson

A few weeks ago the intrepid Chris Anderson visited the Arc90 campus in New York and delivered an engaging and fascinating tech talk on CouchDB.

Now that Vimeo has introduced Vimeo Plus, we can post the entire 2GB video for the world to see. The slides are also available.

Enjoy!

| Comments (0) | Technorati Tags :

Posted on November 5, 2008 by Avi Flax

Ignore Double Slashes in URLs in Restlet Applications

Every once in a while, people accidentally type two slashes instead of one in their URLs.

The Apache httpd server will automatically ignore the double slashes, and treat the URL as if the double slash was a single slash. This is helpful; the server is giving the user what they want, even though they technically didn't ask for it correctly.

Reslet's Router class, however, isn't so forgiving. If you accidentally include a double-slash in the URL of a request, a Restlet application will probably return a 404 Not Found status code.

Thankfully, Restlet's request handling process is so flexible, we can easily add a Filter which will cause the application to ignore double slashes, just like httpd.

If your application uses a subclass of Restlet's Application class, then it is overriding the default getRoot() method to provide your own request handling Restlets.

A standard getRoot() might look something like this:

@Override
public Restlet getRoot()
{
       Router router = new Router();

       // Attach all the routes
       router.attach("path", ResourceClass.class);

       return router;
}

In order to remove double slashes from request URLs before they reach the router, we can create an anonymous Filter class and return it as the root of the application:

@Override
public Restlet getRoot()
{
       Filter doubleSlashFilter = new Filter() {
               @Override
               protected int beforeHandle(Request request, Response response) {
                       Reference ref = request.getResourceRef();

                       String originalPath = ref.getPath();

                       if (originalPath.contains("//"))
                       {
                               String newPath = originalPath.replaceAll("//", "/");
                               ref.setPath(newPath);
                       }

                       return Filter.CONTINUE;
               }
       };

       Router router = new Router();

       // Attach all the routes
       router.attach("path", ResourceClass.class);

       doubleSlashFilter.setNext(router);

       return doubleSlashFilter;
}

And that's it! The application will now ignore double slashes, and will successfully serve requests that accidentally include them.

| Comments (0) | Technorati Tags :

October 2008 | Main | December 2008