niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Apache
Weird gibberish when loading a gif in Firefox, but it's fine in IE...
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
Author Message
Joshua Slive
*nix forums Guru


Joined: 07 Feb 2005
Posts: 1647

PostPosted: Thu Jul 20, 2006 12:18 am    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

On 7/19/06, Edric <ehankamo@yahoo.com> wrote:
Quote:
Ok i got the httpd.conf and mime.types file from my systems person and the
conf file seems correct...

here's a snip of httpd.conf:

IfModule mod_mime.c
TypesConfig /etc/httpd/conf/mime.types
/IfModule

and in mime.types:

image/gif gif

Shouldn't this be all there is to making the server send the correct
content-type for the image? if so, then the only other explanation now would
be whether or not mod_mime.c is loaded, correct? (sorry i would test this
right now but this is production stuff)


If the image is generated dynamically (not from the filesystem), then
mod_mime is not involved. It is up to the program generating the
image to send the correct content-type.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Edric
*nix forums beginner


Joined: 18 Jul 2006
Posts: 7

PostPosted: Thu Jul 20, 2006 12:12 am    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

Ok i got the httpd.conf and mime.types file from my systems person and the conf file seems correct...

here's a snip of httpd.conf:

<IfModule mod_mime.c>
TypesConfig /etc/httpd/conf/mime.types
</IfModule>

and in mime.types:

image/gif gif

Shouldn't this be all there is to making the server send the correct content-type for the image? if so, then the only other explanation now would be whether or not mod_mime.c is loaded, correct? (sorry i would test this right now but this is production stuff)

thanks thanks thanks...

Joshua Slive <joshua@slive.ca> wrote: On 7/19/06, Edric wrote:
Quote:
Hi,

I did look at that earlier and I saw that the TypesConfig directive points
to a mime.types file with the following entry:
image/gif gif

one little quirk i just realized is that the web app/server I'm debugging
isn't the one that hosts the dynamically generated gif file... i have no
control over that server and my app merely accesses the link. would that be
the cause of the problem?

Yes. The server that is sending the image must send the correct
content-type in the http headers. There is no way to work around
that.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------
See the all-new, redesigned Yahoo.com. Check it out.
Back to top
Joshua Slive
*nix forums Guru


Joined: 07 Feb 2005
Posts: 1647

PostPosted: Wed Jul 19, 2006 11:53 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

On 7/19/06, Edric <ehankamo@yahoo.com> wrote:
Quote:
Hi,

I did look at that earlier and I saw that the TypesConfig directive points
to a mime.types file with the following entry:
image/gif gif

one little quirk i just realized is that the web app/server I'm debugging
isn't the one that hosts the dynamically generated gif file... i have no
control over that server and my app merely accesses the link. would that be
the cause of the problem?

Yes. The server that is sending the image must send the correct
content-type in the http headers. There is no way to work around
that.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Edric
*nix forums beginner


Joined: 18 Jul 2006
Posts: 7

PostPosted: Wed Jul 19, 2006 11:46 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

Hi,

I did look at that earlier and I saw that the TypesConfig directive points to a mime.types file with the following entry:
image/gif gif

one little quirk i just realized is that the web app/server I'm debugging isn't the one that hosts the dynamically generated gif file... i have no control over that server and my app merely accesses the link. would that be the cause of the problem?

Thanks again.

Joshua Slive <joshua@slive.ca> wrote: On 7/19/06, Edric wrote:
Quote:
Hi,

There's no content-type being set in the header... this is all i have in the
head:





thanks for your help

He means the HTTP response header, not the html header. Look at the
mime.types file configured by the TypesConfig directive or
alternatively use an AddType directive to set the correct type. See:
http://httpd.apache.org/docs/2.2/mod/mod_mime.html

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.
Back to top
Joshua Slive
*nix forums Guru


Joined: 07 Feb 2005
Posts: 1647

PostPosted: Wed Jul 19, 2006 11:37 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

On 7/19/06, Edric <ehankamo@yahoo.com> wrote:
Quote:
Hi,

There's no content-type being set in the header... this is all i have in the
head:

head
link href="/css/style.css" rel="stylesheet" type="text/css"
/head
thanks for your help

He means the HTTP response header, not the html header. Look at the
mime.types file configured by the TypesConfig directive or
alternatively use an AddType directive to set the correct type. See:
http://httpd.apache.org/docs/2.2/mod/mod_mime.html

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Edric
*nix forums beginner


Joined: 18 Jul 2006
Posts: 7

PostPosted: Wed Jul 19, 2006 11:26 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

Hi,

There's no content-type being set in the header... this is all i have in the head:


<head>
<link href="/css/style.css" rel="stylesheet" type="text/css">
</head>
thanks for your help

David Salisbury <salisbury@globe.gov> wrote: Well I think that last part means your mime stuff ( the types file ) is then completely ignored
by apache.

I'd guess IE reads the file as it's coming in, and figures out it's content type.

Is your script sending a Content-type: in the header? I'm betting it's being defaulted
to text/plain by either Apache or Firefox.

-ds

----- Original Message -----
From: "Edric"
To:
Sent: Wednesday, July 19, 2006 5:11 PM
Subject: Re: [users@httpd] Weird gibberish when loading a gif in Firefox, but it's fine in IE...


Quote:
also the link returns a dynamically generated gif file so there's no gif extension

Edric wrote: he i'm trying to load this gif that has its src set to our apache server

anyhow when i load in firefox, i get strange binary data that is shown as text, while in ie it shows the image perfectly fine.

is this an apache configuration problem or is it something else? i looked at the mime magic file that my httpd.conf file is
pointing to and it has this line:

# GIF
0 string GIF image/gif

i'm not very familiar with MIME stuff... so any simple or trivial (to you) suggestion would be great... thanks.


---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.


---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Back to top
David Salisbury
*nix forums beginner


Joined: 05 Jan 2006
Posts: 35

PostPosted: Wed Jul 19, 2006 11:20 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

Well I think that last part means your mime stuff ( the types file ) is then completely ignored
by apache.

I'd guess IE reads the file as it's coming in, and figures out it's content type.

Is your script sending a Content-type: in the header? I'm betting it's being defaulted
to text/plain by either Apache or Firefox.

-ds

----- Original Message -----
From: "Edric" <ehankamo@yahoo.com>
To: <users@httpd.apache.org>
Sent: Wednesday, July 19, 2006 5:11 PM
Subject: Re: [users@httpd] Weird gibberish when loading a gif in Firefox, but it's fine in IE...


Quote:
also the link returns a dynamically generated gif file so there's no gif extension

Edric <ehankamo@yahoo.com> wrote: he i'm trying to load this gif that has its src set to our apache server

anyhow when i load in firefox, i get strange binary data that is shown as text, while in ie it shows the image perfectly fine.

is this an apache configuration problem or is it something else? i looked at the mime magic file that my httpd.conf file is
pointing to and it has this line:

# GIF
0 string GIF image/gif

i'm not very familiar with MIME stuff... so any simple or trivial (to you) suggestion would be great... thanks.


---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.


---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Edric
*nix forums beginner


Joined: 18 Jul 2006
Posts: 7

PostPosted: Wed Jul 19, 2006 11:11 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

also the link returns a dynamically generated gif file so there's no gif extension

Edric <ehankamo@yahoo.com> wrote: he i'm trying to load this gif that has its src set to our apache server

anyhow when i load in firefox, i get strange binary data that is shown as text, while in ie it shows the image perfectly fine.

is this an apache configuration problem or is it something else? i looked at the mime magic file that my httpd.conf file is pointing to and it has this line:

# GIF
0 string GIF image/gif

i'm not very familiar with MIME stuff... so any simple or trivial (to you) suggestion would be great... thanks.


---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.


---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.
Back to top
Edric
*nix forums beginner


Joined: 18 Jul 2006
Posts: 7

PostPosted: Wed Jul 19, 2006 11:00 pm    Post subject: Re: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

and also here's an example of the gibberish i see:

GIF89a*

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Back to top
Edric
*nix forums beginner


Joined: 18 Jul 2006
Posts: 7

PostPosted: Wed Jul 19, 2006 10:55 pm    Post subject: Weird gibberish when loading a gif in Firefox, but it's fine in IE... Reply with quote

he i'm trying to load this gif that has its src set to our apache server

anyhow when i load in firefox, i get strange binary data that is shown as text, while in ie it shows the image perfectly fine.

is this an apache configuration problem or is it something else? i looked at the mime magic file that my httpd.conf file is pointing to and it has this line:

# GIF
0 string GIF image/gif

i'm not very familiar with MIME stuff... so any simple or trivial (to you) suggestion would be great... thanks.


---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs.Try it free.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
The time now is Thu Dec 04, 2008 4:39 am | All times are GMT
navigation Forum index » Apps » Apache
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts problem loading DSO modules Mauro Apache 5 Thu Jul 20, 2006 8:12 am
No new posts Weird MemoryError issue jedi200581@yahoo.co.uk python 4 Wed Jul 19, 2006 3:58 pm
No new posts shared objects cannot be overwritten even though the proc... prashantarane@gmail.com AIX 3 Wed Jul 19, 2006 6:33 am
No new posts -> Data processing in IExplorer failing / Firefox ok: why... Steve JORDI PHP 5 Tue Jul 18, 2006 1:11 pm
No new posts Trailing cursor on Firefox Mazilo Suse 1 Tue Jul 18, 2006 1:03 pm

3dge Viral Emails | Fuente De | Personal Loans | Credit Cards | Shares
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2364s ][ Queries: 20 (0.1242s) ][ GZIP on - Debug on ]