• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4080: Downloading extension via configure sometimes end up in an "Invalid header block" message

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent Closed   minor  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Downloading an extension via configure sometimes ends in the following error message:

"Invalid header block at offset unknown at /path/to/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 311"

Reason: The HTTP headers are concatenated to the archive.

-- TWiki:Main.OliverKrueger - 16 May 2007

FIXED.

-- TWiki:Main.OliverKrueger - 16 May 2007

performed minor cleanup:

Index: lib/TWiki/Configure/UIs/EXTEND.pm
===================================================================
--- lib/TWiki/Configure/UIs/EXTEND.pm   (revision 13775)
+++ lib/TWiki/Configure/UIs/EXTEND.pm   (working copy)
@@ -90,9 +90,7 @@
     }
 
     # Strip HTTP headers if necessary
-    if ( $ar =~ m/^HTTP/sm ) {
-        $ar =~ s/^HTTP(.*?)\r\n\r\n(.*)/$2/sm;
-    }
+    $ar =~ s/^HTTP(.*?)\r\n\r\n//sm;
 
     # Save it somewhere it will be cleaned up
     my ($tmp, $tmpfilename) = File::Temp::tempfile(SUFFIX => $ext, UNLINK=>1);

using the following test:

#! /usr/bin/perl -w
use strict;

my $ar = "HTTP some text\r\n\r\nsome random text\n\nfinally some more to confuse greedy?\r\n\r\nfinally the end...";

print "ar=[$ar]\n";

# Strip HTTP headers if necessary
$ar =~ s/^HTTP(.*?)\r\n\r\n//sm;

#if ( $ar =~ m/^HTTP/sm ) {
#    $ar =~ s/^HTTP(.*?)\r\n\r\n(.*)/$2/sm;
#}

print "ar=[$ar]\n";

WN

ItemTemplate
Summary Downloading extension via configure sometimes end up in an "Invalid header block" message
ReportedBy TWiki:Main.OliverKrueger
Codebase ~twiki4
SVN Range TWiki-4.1.2, Sun, 13 May 2007, build 13714
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:13772 TWikirev:13776
TargetRelease minor
ReleasedIn

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-01-22 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback