0

All,

I am trying to a call a fly program which generates dynamic images on a webpage and I'm geting this error -> malformed header from script. Bad header=/usr/home/gump/bin/fly:

The main code is as such and I've tried various varaitions of the Content-Type headers to no avail - the simple-lib.pl code which is referred to - I've included as well for reference:

#!/usr/bin/perl5

require 'simple-lib.pl';
&flyprog;

$output = `$flyprog -i $flytemp`;
print "\n\n";
print "Content-Type: text/html\n\n";
print "Content-Type: image/gif\n\n";

print "$output";

#!/usr/bin/perl5

sub flyprog {
  $flyprog = "/usr/home/gump/bin/fly";

}
1;
2
Contributors
3
Replies
12
Views
8 Months
Discussion Span
Last Post by Geoff_3
0

Hello Koneill

I think that you can only have one content type - presumably you want image/gif

Regards

Geoff

0

Yes thanks - I tried it with just the one content type -> print "Content-Type: image/gif\n\n"; but still get the malformed header from script error.

0

Try taking out line 7: print "\n\n";
HTTP expects the header to be terminated by a blank line, and you have given it one here. So it sees an empty header (and presumably ignores the content type on the following line).

Geoff

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.