Almost a year ago I purchased a wildcard SSL certificate from GoDaddy. When it was first issued I simply loaded it into into my Zeus ZXTM load balancer with the import button.

cert1.jpg

Everything seemed fine for quite awhile. I visited my web site in Firefox and in all of the flavors of IE. It seemed to work great. That is, until, someone called me to let me know that Safari was not accepting the certificate! I thought I was in trouble until I googled around and found many blog entries about the root cause. It turns out that my server, or in this case my Zeus ZXTM load balancer, was not configured to display the whole certificate chain back to the root authority.

This makes me wonder how this worked at all in every other web browser. Perhaps this is such a common problem that the other browsers hack around it?

Anyway, the fix was easy enough but the terminology was different. Rather than an SSLCertificateChainFile, my ZXTM called it an ‘Intermediate Certificate’. One click of a button, browsing to gd_bundle.crt (provided with my original certificate), and it was loaded up and the issue was fixed.

cert2.jpg

0 Votes

I attempted to set up an SSH tunnel today to access a web application that was only bound to a private IP. I tunneled to my opensolaris box, which worked fine, and then attempted to establish a connection with telnet. Telnet reported that the connection was refused and I saw this on my command line for the tunnel:

$ ssh johndoe@foo.bar.com -L 8080:foo.bar.com:8080 -N
channel 2: open failed: administratively prohibited: open failed

I made a pretty silly mistake, but I figure it may save someone’s time to post it here. Of course the connection was refused. My ssh tunnel attempts to establish the connection to the public domain name, which uses the public IP (the same one I’m SSHing into). The web server I’m trying to reach is not bound to that adapter!

Here’s a correct command:

$ ssh johndoe@foo.bar.com -L 8080:localhost:8080 -N
0 Votes

I’ve been working on a Java servlet these days which for many reasons needs to determine the mime type of files so that files being rendered are correctly used by my clients. For example, I’m generating a crossdomian.xml, which if not matched with the text/xml content type, really confuses flash players.

Anyway, I fumbled around for a bit in Google and found one great solution: mime-util. It’s Apache License and works great. The documentation is even very good.

Since I can trust my file names I opted for the simple file name extension detection method. It’s a perfect fit except for one thing: I need to detect the application/json content type which is not part of the default property bundle.

It took me a few minutes of digging trough the JavaDocs to find the answer, so to save you some time, here’s my solution:

  1. Create a file named mime-types.properties and put it somewhere in your class path.
  2. Add the types you need as extension=type pairs like json=application/json
0 Votes

I’ve been working on a Java servlet these days which for many reasons needs to determine the mime type of files so that files being rendered are correctly used by my clients. For example, I’m generating a crossdomian.xml, which if not matched with the text/xml content type, really confuses flash players.

Anyway, I fumbled around for a bit in Google and found one great solution: mime-util. It’s Apache License and works great. The documentation is even very good.

Since I can trust my file names I opted for the simple file name extension detection method. It’s a perfect fit except for one thing: I need to detect the application/json content type which is not part of the default property bundle.

It took me a few minutes of digging trough the JavaDocs to find the answer, so to save you some time, here’s my solution:

  1. Create a file named mime-types.properties and put it somewhere in your class path.
  2. Add the types you need as extension=type pairs like json=application/json
0 Votes

Once upon a time I tried to open a file for editing with MacVim and saw this message:

$  vi foo.xml 
E575: viminfo: Illegal starting char in line: ion.properties
$

I assumed there was something wrong with the file that I was editing, so I tried a different file. I observed the same result.

**The Problem Your .viminfo file is corrupt. This file does not contain settings or anything, mostly temporary and working data.

**The Fix Delete your ~/.viminfo file

0 Votes

Recent Assets

  • cert2.jpg
  • cert1.jpg
  • IntelliJ IDEA font config
  • artifactory_import_fail.jpg
  • groovy_inspect.jpg