![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to restore original package after uninstalling the upgraded package using rpm | amitpansuria | Linux | 0 | 05-27-2008 01:08 AM |
| Could be a corrupted file? | kaugrs | HP-UX | 1 | 01-16-2008 08:22 AM |
| LV corrupted | Alfredo Jimenez | AIX | 1 | 08-23-2005 05:38 AM |
| kernerl corrupted | art_malabanan | SCO | 3 | 09-24-2003 07:45 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi,
First, I wasn't sure if my question is appropriate for this forum. Still, I post here as I have a great respect for the knowledge that flows here. Below are the details of my web application File Server - Windows NT (End user files are stored) Storage type - SAN (Storage area network) Web server - Apache 2.0.58. on HPUX Coding - Perl (Uses LWP download for http access) Note: The files are first downloaded to web server and then users download the same from web server to local machine. As the upload of user file is through a different tool, there is no visibility on its architecture. My application is used by users to download those files. I use file <filename> to get the file attributes. I check for types cpio, gz or compress and take appropriate action. If the file is of type .pkg then I do nothing before download. With the above state, the .exe files that are downloaded are corrupted. I mean they are not the same as the ones that are uploaded. Please help, I can explain more. Regads |
| Forum Sponsor | ||
|
|
|
|||
|
.exe package is corrupted
No luck :-( My suspision was exactly that; below is the code that I changed to see if that was the cause. I am not very sure what happens with the LWP download (LWP is a perl module). I am not very good in Perl. I learnt Perl for this application.
open(DLFILE, "<$files_location$_[0]") || Error('open', 'file'); @fileholder = <DLFILE>; close (DLFILE) || Error ('close', 'file'); print "Content-length: $filesize\n"; # print "Content-Type:application/x-download\n"; print "Content-Type:application/binary\n"; print "Content-Disposition:attachment;filename=$_[0]\n\n"; print @fileholder; |
|
|||
|
Are you really supposed to add headers like that smack dab in the file itself? It's a thing commonly done by a server so it might be perfectly okay but if you are adding headers where you're not supposed to, that's pretty sure to destroy the file.
|
|||
| Google UNIX.COM |