Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BASH script tries to download instead of run?

Status
Not open for further replies.

Hondy

Technical User
Mar 3, 2003
864
GB
Hi

I have a BASH shell script that excutes via a browser, when I run it in IE8 (IE 7 emulation) it runs ok, when I use firefox the script tries to download (save as..)-- why is this and how do I get it to run in Firefox?

Thanks

 
Hi Ben

The thing is, I don't want the browser to anything with it, it should be server side just like ASP or PHP. I have had it working and doing what I want but it seems a bit random whether it parses the script or tries to save it!

 
I don't want the browser to anything with it,
I know... but the browser sees the extension as a file, and thus it will offer you to download it... this you need to undo, by telling FF what to do with that type of extension, or by resetting it...

Ben

"If it works don't fix it! If it doesn't use a sledgehammer..."

How to ask a question, when posting them to a professional forum.
 
Hi Ben

I see what you are saying, but changing how file extensions are interpreted on every client doesn't sound quite right to me. I would have thought the issue would be server side?

Your link led me to here
Any idea how to set a MIME type for a BASH script?

Thanks
 
I managed to get there in the end...

this causes odd results...
echo "content type: text/html"

this works properly...
echo "Content-type: text/html"

:)
 
Glad you finally found the solution to your problem...

I was under the impression that this was happening on one machine only, and not globally...

Case sensitivity, can at times be hard to diagnose...

PS: should it not be echo "Content-Type: text/html", to be on the safe side...

Ben

"If it works don't fix it! If it doesn't use a sledgehammer..."

How to ask a question, when posting them to a professional forum.
 
Hi Ben

No it wasn't a global thing, it worked on my IE browser but there were a number of scripts so I'm a bit confused as to what happened but I know what works now anyway. It now works in Firefox which was my goal, thanks for the input!

Cheers
 
Hondy said:
I managed to get there in the end...

this causes odd results...
echo "content type: text/html"

this works properly...
echo "Content-type: text/html"

Content-type would be the proper header. I.E. probably ran it because it wasn't as "Strict" as FireFox.



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top