rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rejetto

Pages: 1 2 3 4 ... 890
16
Bug reports / Re: The video won't play on the iPhone iOs 15.0!
« on: January 20, 2022, 12:07:23 PM »
ok, now you got Content-Disposition: filename="The_Walking_Dead_S09E01.mp4";
before you had Content-Disposition: attachment; filename="The_Walking_Dead_S09E01.mp4";
you can see the difference.
if this is not yet enough, it's the whole line that must be wiped, and HFS allows you to do it, is just a bit trickier.
From some investigation I suspect that hfs SHOULD do that by protocol automatically, and if so it should be considered a bug.
Anyway, you can workaround this opening Events (in the menu or ALT+F6), and add something like this

[download]
{.if not|{.pos|attach|{.header|Content-Disposition.}.}|{:
  {.remove header|Content-Disposition.}
:}.}

17
Bug reports / Re: The video won't play on the iPhone iOs 15.0!
« on: January 20, 2022, 11:09:48 AM »
if you use curl -I <url> you'll see the differences between one request and the other.
The only difference I see is in "Content-Disposition"
that you can change by using the "Open directly in browser" option. I think it's under "other options"

18
HFS ~ HTTP File Server / Re: Hosting and PDF viewing
« on: January 19, 2022, 04:47:54 PM »
ok you can disable the attachment thing:
Menu > other options > open directly in browser

the port problem with HFS 3 is that it's not clear that the # at the beginning is to disable the line, so your changes are actually ignored.
Remove it.
I will consider this thing for next release.

19
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 19, 2022, 11:28:04 AM »
in the paste i've met issues using transparency for fonts, for the sake of shading, and in this case it's easy to decided a opaque code for the final color.
#8ac may do the job

20
HFS ~ HTTP File Server / Re: Hosting and PDF viewing
« on: January 19, 2022, 08:13:49 AM »
it doesn't like something in the hfs answer but it's hard to know what.
if you would know, it could be possible that you can modify hfs answer to comply.
you can try to file this as a big to adobe.
you may also make a test with hfs 3, but beware it's a very different program and you will start from zero
https://github.com/rejetto/hfs/releases

21
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 18, 2022, 05:49:04 PM »
...and HFS 3 just got https support :)
i hope we'll be able to integrate letsencrypt automatic generation, maybe as a plugin

22
hi, i keep my root unprotected, so i consider it safe.
Those are attempts at exploiting old bugs not present in current version.
Still those messages are annoying to look at. It would be nice if someone comes with filter to avoid those requests from being received/displayed, even just for peace of mind.

Bugs can be nasty, every software has some from time to time. Point is: adding authentication is not necessarily a solution, it just depend if the bug is accessible without of it interfering.
In real world you should just keep your software updated and check there is no known security problem with latest version.
This is true for any software out there.

btw, i'm working on HFS 3 these days. I hope it will officially replace "current" version in 1-3 months. I already use it with great satisfaction.

23
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 18, 2022, 12:16:47 PM »
ciao mandoz, don't worry, i was just surprised someone would want/need to use IE on win10
and then i declared it won't work.
i'm using portable chrome for testing purposes (compatibliity), so it's not a matter of being portable.
peace

24
:) good luck

your gitlab link says Page Not Found

25
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 17, 2022, 08:42:05 PM »
Internet Explorer? On Windows 10?  Seriously? 😆

Hfs is not compatible with it and it will probably never will.

26
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 17, 2022, 07:54:00 PM »
i have no idea: if it says listening on port 80 it is supposed to work, but further investigation is complicated.
you could verify that the port is actually open. it can be done in several ways. An easy one is running: telnet localhost 80
if a black window without text opens, then the port is open.

also, can you post a single screenshot with both your browser on localhost and hfs window running?

27
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 17, 2022, 07:14:01 PM »
yes, it seems to be working, but you are right: it doesn't tell you what to do.
open your browser and type "localhost" in the address bar.
I will add this message to the next version :)

28
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 17, 2022, 04:38:15 PM »
I don't see the problem in ensuring you get directly an absolute path. Seems easy.
It's cool someone is playing with it.

29
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 17, 2022, 01:47:51 PM »
i like the .init suggestion.
About the async, it's ok that you define your init as async.
I will await the init so we are covered for the future. At the moment there's nothing done synchronously after that.

About importing HFS sources.
When executing "normally" with node you probably can require('../../src/config')
like this
Code: [Select]
const { getConfig } = require('../../src/config')
console.log('ciao', getConfig('port'))

but this won't work with exe distributions (just tried), as I noticed it virtualize sources position.
So my idea is that this will be the way to go from next version
Code: [Select]
exports.api = {}
exports.init = function() {
const { getConfig } = require(exports.api.srcDir + '/config')
console.log('ciao', getConfig('port'))
}

Good? Better ideas?

30
HFS ~ HTTP File Server / Re: a new beginning...
« on: January 17, 2022, 11:39:29 AM »
While I can understand changes to plugin, this "cloning" may not as good as think. It's better to consider the "prototype" in JavaScript.

i'm happy to see that you know this case could make use of prototypes. :) It's a concept most javascript programmers ignore, but I've always liked.
In THIS case anyway it may be better to keep shallow-cloning, as (1) it is easy to read for most programmers, (2) there's no actual difference in performance, (3) I should reconsider the rest of the code as they are not equivalent (for a start, the "delete" won't do what I need, and there may be other consequences in the rest of the source).

Code: [Select]
var traditTpl = function(ctx) { template.serve(ctx); return true; }
traditTpl.prototype.middleware = function(ctx) { template.serve(ctx); return true; }
// ...
module.exports = traditTpl;

While this may work, the use it makes of prototypes seems pointless to me. Maybe you have some use of it that I don't see here.

Quote
I just think it maybe useful, so wrote this by casual. And hfs 0.6 really want a "middleware" attribure.
But this didn't work -- the object cloning doesn't clone the prototype.

you are not supposed to do like that.
there's a simple example provided, and it's very simple:
exports.middleware = function(ctx) { }

Pages: 1 2 3 4 ... 890