rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: LeandroTLZ on April 02, 2004, 02:39:26 PM
-
Hey,
A friend of mine gave me HFS via mail not long ago, and I really like it. While I know it wasn't meant to be a 'real' webserver, I'm using it like that to share files with friends. And here's the small problem I'm having: if I put HTML pages or TXT files in the virtual directory structure, HFS sends the Content-Disposition: attachment header, so browsers like Mozilla Firefox ask the user to download the file (IE just displays the page, but that's because IE never gave a damn about standards).
So... I'd like to know if there is an option to disable the Content-Disposition: attachment header based on MIME type or extension (or, if it could be added in a future release). I can't seem to find such an option in the MIME Types tab, where I think it belongs.
The above alone would make me a really happy camper, but the icing of the cake would be a simple toggle to 'Serve index.html if found instead of directory listing'.
Thanks for your time, great work, and read you later.
-
I am using Firefox 0.8 and HFS 1.6 rc 21
I haven't altered the mime types of either Firefox or HFS
When I click on an HTML file in Firefox, I see the webpage
When I click on a TXT file, I see the text
When I click on a JPG or GIF, I see the picture
It seems to be working ok for me
In HFS, when I click Menu, Other Options, MIME types,
there is an entry:
File Mask: *.htm;*.html
MIME Description: text/html
and
File Mask: *.txt
MIME Description: text/plain
-
leandro, that bug was fixed a long ago
but i don't remember when
try using last stable (1.5) and last beta (1.6)
i think at least one of them will work
-
I too have the same problem. (rc26b)
GET /index.htm HTTP/1.1
Host: 127.0.0.1
Accept: */*
Connection: keep-alive
HTTP/1.1 200 OK
Content-type: text/html
Content-length: 100
Content-Disposition: attachment; filename="index.htm"
I agree that we should have an option to remove the Content Disposition header for types of files since some also want to use HFS as a webserver.
Also is there a feature that allows index pages? ex. index.htm?
Comment: CAP the letters in bold and italics.
-
While I know it wasn't meant to be a 'real' webserver
but it is meant to become it
HFS sends the Content-Disposition: attachment
it does only when the file does not match your MIME configuration.
you should double check your mime configuration, or just tell me the exact filename that is not working and open your HFS.INI and report the line startin with mime-types=.
BTW, i noticed there's a bug in the input for the mime configuration, so be careful.
based on MIME type or extension
that's what it's meant to do
'Serve index.html if found instead of directory listing'
already available in the unpublished 2.0
you will find soon a preview version on this forum
CAP the letters in bold and italics.
fixed in 2.0
-
Thanks rejetto!
Good luck on v2! :)