CUPS, Firefox 3 and HTTPS failure

I just ran into a problem with OpenSuSE 11.0, CUPS and FireFox 3 on Windows where adding a printer hangs between selecting the make of the printer, and selecting the model. It appears the same version of CUPS is also used in 11.1.

This is a known problem with CUPS, you can find the solution here:

STR #2892 - Bugs & Features - Common UNIX Printing System

"In Firefox 3, SSL traffic is sent in fewer packets than in previous versions, so clicking on ‘Continue’ in the CUPS web interface when adding a printer may only send one single large packet.

What I have observed is that when data is available to read on a connection, and this is SSL data, it will read in a buffer full and process it. However, when cupsdReadClient finishes, the scheduler will not wake up until the next time poll() says there is data to read.

The problem is that it has already been read, by the SSL library (gnutls, in the case I’m examining). The data is sitting waiting to be discovered by gnutls_record_check_pending(), but this function is never called after cupsdReadClient returns, at least not until the user clicks ‘Stop’ and the connection is closed.

At that point, the scheduler wakes up and processes the data – but by then it’s too late."

It would be nice to see an update to CUPS that adds this patch. I believe it is needed in both 11.0 and 11.1, but I don’t have access to my 11.1 machine here at work…