Roundcube Community Forum

Release Support => Release Discussion => Topic started by: carlswart on August 13, 2010, 03:46:21 AM

Title: Spell check problem ... GoogieSpell
Post by: carlswart on August 13, 2010, 03:46:21 AM
I ran into a problem with Roundcube 0.3.1.

After setting the spell checker to GoogieSpell (googie), even though there were clear spelling errors in the message, nothing was detected.

After some debugging, I tracked the problem to the /program/steps/mail/spell_googie.inc file.

It seems the HTTP Host: header that is being passed to Google, leaves Google unhappy and Google then sends back a HTTP 302 code instead of the actual result.

Attached is my patch to fix the problem:
--- spell_googie.inc.orig       2010-08-13 09:36:08.005102366 +0200
+++ spell_googie.inc    2010-08-13 09:39:09.545094949 +0200
@@ -45,6 +45,9 @@

 if ($fp = fsockopen($host, $port, $errno, $errstr, 30))
   {
+  if (preg_match('/^ssl:\/\/(.*)$/', $host, $matches)) {
+       $host = $matches[1];
+  }
   $out = "POST $path HTTP/1.0\r\n";
   $out .= "Host: $host\r\n";
   $out .= "Content-Length: " . strlen($data) . "\r\n";
Title: Spell check problem ... GoogieSpell
Post by: rosali on August 13, 2010, 03:58:04 AM
This has been fixed in v0.4stable.