Index: gtrans.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gtrans/gtrans.module,v
retrieving revision 1.13
diff -u -p -r1.13 gtrans.module
--- gtrans.module 8 May 2007 23:19:03 -0000 1.13
+++ gtrans.module 5 Mar 2008 01:11:44 -0000
@@ -151,7 +151,7 @@ function gtrans_translate_page($hl='fr')
else{
// connected!
// prepare headers to send
- $out = "GET /".$uri." HTTP/1.1\r\n";
+ $out = "GET /".$uri." HTTP/1.0\r\n";
$out .= "Host: ".$url."\r\n";
$out .= "Connection: Close\r\n\r\n";
// send header
@@ -173,9 +173,6 @@ function gtrans_translate_page($hl='fr')
watchdog('user', t('Attempt failed to translate page').' '.$_SERVER['REQUEST_URI'].' '.t('to').' '.$languages[$hl].': No content from Google Translate server');
}
else{
- // now prepare content
- $content_array = explode("\r\n", $content);
- $content = $content_array[1];
// Google Translate modifes all links to point to it,
// we will reverse this action and take the links back
$content = preg_replace('//', '', $content);