LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 09: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, 12:58 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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, 01: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, 01: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, 03:06 PM   #5
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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 03:11 PM.
 
  


Reply



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 12:30 PM
no sound in HTML 5 - Firefox & Chrome kouta Linux - Software 2 10-19-2011 09:38 PM
Lighttpd - how to name the index.html of additional domain? satimis Linux - Server 1 04-18-2011 12:22 PM
LXer: Benchmark: Apache2 vs. Lighttpd (Static HTML Files) LXer Syndicated Linux News 0 09-21-2008 04:50 PM
howto make html link to chrome:// page Brain Drop Programming 1 02-23-2006 02:15 AM

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

All times are GMT -5. The time now is 05:07 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