Sponsored Content
Full Discussion: Content-Type
Top Forums UNIX for Dummies Questions & Answers Content-Type Post 12203 by theDirtiest on Thursday 20th of December 2001 11:36:05 PM
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.
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
Courriel::Header::ContentType(3pm)			User Contributed Perl Documentation			Courriel::Header::ContentType(3pm)

NAME
Courriel::Header::ContentType - The content type for an email part VERSION
version 0.29 SYNOPSIS
my $ct = $part->content_type(); print $ct->mime_type(); print $ct->charset(); my %attr = $ct->attributes(); while ( my ( $k, $v ) = each %attr ) { print "$k => $v "; } DESCRIPTION
This class represents the contents of a "Content-Type" header attached to an email part. Such headers always include a mime type, and may also include additional information such as a charset or other attributes. Here are some typical headers: Content-Type: text/plain; charset=utf-8 Content-Type: multipart/alternative; boundary=abcdefghijk Content-Type: image/jpeg; name="Filename.jpg" API
This class supports the following methods: Courriel::Header::ContentType->new_from_value( ... ) This takes two parameters, "name" and "value". The "name" is optional, and defaults to "Content-Type". The "value" is parsed and split up into the mime type and attributes. Courriel::Header::ContentType->new( ... ) This method creates a new object. It accepts the following parameters: o name This defaults to 'Content-Type'. o value This is the full header value. o mime_type A string like "text/plain" or "multipart/alternative". This is required. o attributes A hash reference of attributes from the header, such as a boundary, charset, etc. The keys are attribute names and the values can either be strings or Courriel::HeaderAttribute objects. Values which are strings will be inflated into objects by the constructor. This is optional, and can be an empty hash reference or omitted entirely. $ct->name() The header name, usually "Content-Type". $ct->value() The raw header value. $ct->mime_type() Returns the mime type value passed to the constructor. However, this value will be in all lower-case, regardless of the original casing passed to the constructor. $ct->charset() Returns the charset for the content type, which will be the value found in the "attributes", if one exists. $ct->attributes() Returns a hash (not a reference) of the attributes passed to the constructor. Attributes are Courriel::HeaderAttribute objects. The keys of the hash are all lower case, though the original casing is preserved in the "name()" returned by the Courriel::HeaderAttribute object. $ct->is_binary() Returns true unless the attachment looks like text data. Currently, this means that is has a charset defined and the charset is not "binary". $ct->attribute($key) Given a key, returns the named Courriel::HeaderAttribute object. Obviously, this value can be "undef" if the attribute doesn't exist. Name lookup is case-insensitive. $ct->attribute_value($key) Given a key, returns the named attribute's value as a string. Obviously, this value can be "undef" if the attribute doesn't exist. Name lookup is case-insensitive. The attribute is a Courriel::HeaderAttribute object. $ct->as_header_value() Returns the object as a string suitable for a header value (but not folded). Note that this uses the original casing of the mime type as passed to the constructor. EXTENDS
This class extends Courriel::Header. ROLES
This class does the Courriel::Role::HeaderWithAttributes role. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) perl v5.14.2 2012-03-07 Courriel::Header::ContentType(3pm)
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy