AidanLee has asked for the wisdom of the Perl Monks concerning the following question:
What should be the easiest thing in the world is not working for some reason. I've constructed the script (shown in its entirety) below so that an end-user can run a script that is usually run as a cron job. Note that the script this script runs produces no output (ran from the command line).
The only thing apache is telling me in it's logs is "Premature end of script headers" even though the headers appear fine (as they should, not hand-rolling them myself).
output at the command line:#!/usr/bin/perl use CGI; my $q = new CGI; print $q->redirect(-location => "http://redirected_url"); system 'perl /path/to/script.pl inputfile.txt';
any ideas what's wrong?Status: 302 Moved location: http://redirected_url ---- there is a blank line here, as there should be ---
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: failing to generate proper http redirect headers
by isotope (Deacon) on Aug 29, 2003 at 19:47 UTC | |
by merlyn (Sage) on Aug 30, 2003 at 12:32 UTC | |
by isotope (Deacon) on Sep 03, 2003 at 21:26 UTC | |
by AidanLee (Chaplain) on Sep 04, 2003 at 19:59 UTC | |
Re: failing to generate proper http redirect headers
by The Mad Hatter (Priest) on Aug 29, 2003 at 19:44 UTC | |
by AidanLee (Chaplain) on Sep 03, 2003 at 15:34 UTC |