LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2013, 10:34 AM   #1
5883
Member
 
Registered: Aug 2004
Posts: 173

Rep: Reputation: 0
my lighttpd handles *.pl, but not *.html in firefox/chrome


everything works fine in IE.

when i open *.pl in ff/chrome, also fine.

but if i open a very very basic *.html in ff/chrome, they will download the file, instead of opening it in the browser.

so confused, any suggestions ?

Thanks !
 
Old 05-03-2013, 01:58 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,861
Blog Entries: 36

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
What do the HTTP headers say?
Code:
curl -D - -o /dev/null "http://someurl.com/file.html" 2> /dev/null
Let me know the output.

SAM
 
Old 05-03-2013, 02:02 PM   #3
5883
Member
 
Registered: Aug 2004
Posts: 173

Original Poster
Rep: Reputation: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm="Password protected"
Content-Type: text/html
Content-Length: 351
Date: Fri, 03 May 2013 18:02:24 GMT
Server: lighttpd/1.4.28

117 351 117 351 0 0 118k 0 --:--:-- --:--:-- --:--:-- 171k




Quote:
Originally Posted by sag47 View Post
What do the HTTP headers say?
Code:
curl -D - -o /dev/null "http://someurl.com/file.html" 2> /dev/null
Let me know the output.

SAM
 
Old 05-03-2013, 02:05 PM   #4
5883
Member
 
Registered: Aug 2004
Posts: 173

Original Poster
Rep: Reputation: 0
Actually i get rid of the password,


% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 200 OK
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 100
Date: Fri, 03 May 2013 18:04:56 GMT
Server: lighttpd/1.4.28

0 100 0 100 0 0 45913 0 --:--:-- --:--:-- --:--:-- 97k
 
Old 05-03-2013, 04:06 PM   #5
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,861
Blog Entries: 36

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
Quote:
Originally Posted by 5883 View Post
Content-Type: application/octet-stream
There's your problem. That's why standard browsers are trying to download it rather than view it directly. IE generally does whatever it wants as a rule of thumb. The Content-Type header value should be...
Code:
Content-Type: text/html
There must be some configuration for the Content-Type somewhere in lighthttpd.

EDIT: Look for the mimetype.assign. In the config files.

Quote:
list of known mimetype mappings NOTE: if no mapping is given "application/octet-stream" is used
You probably just need to give html files a mimetype.

Last edited by sag47; 05-03-2013 at 04:11 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML/Chrome: display:none; doesn't seem to work eantoranz Programming 2 10-29-2011 01:30 PM
no sound in HTML 5 - Firefox & Chrome kouta Linux - Software 2 10-19-2011 10:38 PM
Lighttpd - how to name the index.html of additional domain? satimis Linux - Server 1 04-18-2011 01:22 PM
LXer: Benchmark: Apache2 vs. Lighttpd (Static HTML Files) LXer Syndicated Linux News 0 09-21-2008 05:50 PM
howto make html link to chrome:// page Brain Drop Programming 1 02-23-2006 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration