Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: CGI-Attachment with many \0's

by UnderMine (Friar)
on May 06, 2004 at 13:44 UTC ( #351107=note: print w/ replies, xml ) Need Help??


in reply to CGI-Attachment with many \0's

Can I have a bit more information and clarification.

Have you tried getting the script to write the file to disk and if you have, can this file be retrieved by the clients correctly?

If you have and both were successful have you tried having the script simultaniously write a copy of the file and return it to the client? Comparing the results might give us some more pointers to work with.

Thanks
UnderMine


Comment on Re: CGI-Attachment with many \0's
Re: Re: CGI-Attachment with many \0's
by stefan k (Curate) on May 06, 2004 at 13:55 UTC
    Hi,

    Have you tried getting the script to write the file to disk

    Yes

    can this file be retrieved by the clients correctly?

    Yes, I've written that file to the /tmp-Dir, copied it to the HTTPD-root-directory accessed it directly and could download it just fine.

    have you tried having the script simultaniously write a copy of the file and return it to the client?

    No, I am using the following code:

    my $tar = Archive::Tar->new; # ... # in a loop: $tar->add_files("$filename"); # ... my $data = $tar->write(); print $q->header(-type => 'application/octet-stream', -attachment => "edi.tar"); print $data;
    And remember: it works fine on two out of three machines. That is what makes me wonder so much.

    Regards... Stefan
    you begin bashing the string with a +42 regexp of confusion

      How different are the httpd.conf files for the two redhat machines? Are there any extra later steps the data stream goes though? Eg one running Apache::Compress on the output stream.

      Hope it helps
      UnderMine

        The only differences are related to the user-directory: I enabled it on one machine, set the name to "public_html" and arranged a CGI directory for the users. But the problem does not seem to be related to that because it doesn't make any difference whether running it in /var/www/cgi-bin or in $HOME/public_html/cgi-bin.

        Regards... Stefan
        you begin bashing the string with a +42 regexp of confusion

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://351107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2014-07-14 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls