Content-Type


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Content-Type
# 1  
Old 12-20-2001
Question Content-Type

hey.. found out what was wrong. didnt have Read permission of the file for others LOL. But yeah the C version of it, why does it work in Netscape and not IE?
primal
-----

Hey everyone!
Has anyone run into this before...
I'm creating a UNIX CGI program that will parse $QUERY_STRING and save it into a file, then cat the file to an email address. However in Internet Explorer the email is blank. On the website it says something like "No subject, no body; hope that's ok!"
I ran into this before when I wrote the CGI program in C.
However, when I ran it in Netscape it worked fine.
A friend of mine said it was beacuse of the "Content-Type"
Code:
#!/bin/sh
echo "Content-Type: text/html"
echo ""

Does anyone know how to get it working in IE?
Thanks!
primal

Last edited by primal; 12-20-2001 at 10:15 PM..
# 2  
Old 12-21-2001
try adding \n\n to the end.....like so........

echo "Content-Type: text/html\n\n"

i'm not exactly sure if this is will help, but everytime I print the content type i have those two line feeds at the end.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

"Content-type: text/html No input file specified." Only in CRON but not when executed directly

Hi gang, I have the following code inside a the file script.sh #!/bin/bash todaysdate=$(date --date='7 day' +'%d') todaysmonth=$(date +'%m') todaysyear=$(date +'%Y') yahoodatestring=$todaysyear$todaysmonth$todaysdate nicedate=$(date --date='5 day' +'%A') nice="$nicedate,... (2 Replies)
Discussion started by: phpchick
2 Replies

2. Shell Programming and Scripting

Facing issues with Content-Type:application/x-download Content-Disposition:attachment

I am in the process of developing a perl cgi page. I had succeeded in developing the page but there are few errors/issues with the page. description about cgi page: My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies

3. Shell Programming and Scripting

Determine Content-Type

I am limited to using only libraries that come with the default install of ActivePerl. I'd like to be able to determine the content type of a file on the fly. I thought CGI.pm might do it, but it looks a little weird to me from the perldoc. If someone has a quick way to determine the type of... (4 Replies)
Discussion started by: mrwatkin
4 Replies

4. Shell Programming and Scripting

determine file type by content, not extension

I have a directory structure with multiple sub directories. Within each directory, there are files without extensions. Is it possible to somehow tell what the file type should be by the file contents? For example, I opened one of the files using an editor. After scrolling to the end of the... (2 Replies)
Discussion started by: daflore
2 Replies

5. Shell Programming and Scripting

Check file content type

I have a shell script that takes a file and uses "syncsort" to sort contents. I want to add a condition to check whether the input file is textual or binary format. If textual, the "syncsort" will be used to sort the files contents. Otherwise, the sorting process will be skipped. Note that the... (3 Replies)
Discussion started by: synthea
3 Replies

6. Programming

array type has incomplete element type

Dear colleagues, One of my friend have a problem with c code. While compiling a c program it displays a message like "array type has incomplete element type". Any body can provide a solution for it. Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies

7. Shell Programming and Scripting

String type to date type

Can one string type variable changed into the date type variable. (1 Reply)
Discussion started by: rinku
1 Replies

8. UNIX for Dummies Questions & Answers

is there a content type command?

Hi I run on a Unix webserver at my university. I have a couple of *.inc files which are include files used for php. They are all in one folder without an index file. If you go to the folder, you get to see a list of files in that dir. Some of the .inc have a question mark icon next to... (3 Replies)
Discussion started by: aqh2
3 Replies
Login or Register to Ask a Question