rejetto forum

Software => HFS ~ HTTP File Server => Beta => Topic started by: rejetto on March 09, 2010, 01:00:04 PM

Title: Testing build #258
Post by: rejetto on March 09, 2010, 01:00:04 PM
download @ www.dovedove.it/hfs/hfs258.exe

what's new
+ {.get|agent.} now supports iPhone, iPod, iPad, Chrome and generic WebKit browsers
+ log record for external address change (you can disable it by "other events")
+ new event [pre-filter-request] [link] (http://www.rejetto.com/forum/index.php/topic,8320.msg1049250/topicseen.html#msg1049250)
* "show customized options" will not list last-external-address and dynamic-dns-host
* filelists sorting was disabled, and is now enabled [link] (http://www.rejetto.com/forum/index.php/topic,8313.0.html)
- {.get|uri.} was ignoring any parameter after a parameter not in the form X=Y
Title: Re: Testing build #258
Post by: rejetto on March 09, 2010, 01:47:15 PM
mars moved to http://www.rejetto.com/forum/index.php/topic,8325.0.html
Title: Re: Testing build #258
Post by: r][m on March 09, 2010, 03:48:10 PM
I can't download 258. Says server not found?
Title: Re: Testing build #258
Post by: SilentPliz on March 09, 2010, 03:54:26 PM
The link works normally for me.
Title: Re: Testing build #258
Post by: rejetto on March 09, 2010, 04:02:51 PM
works here
Title: Re: Testing build #258
Post by: r][m on March 09, 2010, 08:35:31 PM
Resolved:
(I think) added to "hosts" file allowed connection. 258 downloaded.
Thanks  :)
Rejetto
Title: Re: Testing build #258
Post by: r][m on March 11, 2010, 04:47:08 PM
In 258 I find that settings for
Menu > Virtual File System > Folders Before doesn't work.
In 257 it does. Not a big problem here.
Could someone else confirm?
Title: Re: Testing build #258
Post by: crazyboris on March 11, 2010, 06:06:07 PM
just tested and it works for me.
Title: Re: Testing build #258
Post by: keynes Lee on March 12, 2010, 04:40:12 PM
In 258,
I have an file "index.html" in the folder.
How can I prevent HFS to read and open the html file??

in 2.2f
There is no these kind of issue
Title: Re: Testing build #258
Post by: r][m on March 12, 2010, 05:32:40 PM
In 258,
I have an file "index.html" in the folder.
How can I prevent HFS to read and open the html file??

in 2.2f
There is no these kind of issue
You might try adding a non existing file mask for that folder.
In VFS window right click the folder, go to properties, File Mask Tab, in Default File Mask
enter something like   doesn't-exist.html.
Your file has the .html extension so when a user clicks on it, it will open as a web page.
If they want to download it, they must right click and "Save target as".
I use this method to remotely edit web pages.
There may be a better way, but this works for me.
Title: Re: Testing build #258
Post by: r][m on March 12, 2010, 05:55:15 PM
In 258 I find that settings for
Menu > Virtual File System > Folders Before doesn't work.

just tested and it works for me.
Odd....
Just deleted ini, and retested. Folders before checked, doesn't put the folders at the top
of the page in 258 as it does in 257 here. See screen shots.
Title: Re: Testing build #258
Post by: Mars on March 12, 2010, 07:09:36 PM
go to menu >> other options >> defaut sorting

check by ext, then check by name  and save options

 :)

the problem can be solved by adding one line in main.pas

INITIALIZATION
defSorting:='name';
randomize();

I would like it's possible to add the possibility to overwrite the options foldersbefore and linksbefore in the main menu

The elegant solution is the following one:

http://url/?sort=n&rev&foldersbefore=1&linksbefore=0

Quote
procedure TfileListing.sort(conn:ThttpConn; def:string='');
......
  end; // qsort

  function isFalse(s:string):boolean;
  begin result:=(s='') or (strToFloatDef(s,1) = 0) end;

var
  v: string;
begin
// caching
foldersBefore:=mainfrm.foldersBeforeChk.checked;
linksBefore:=mainfrm.linksBeforeChk.checked;

v:=first(def, defSorting);
rev:=FALSE;
if assigned(conn) then
  with TconnData(conn.data).urlvars do
    begin
    v:=first(values['sort'], v);
    rev:=values['rev'] = '1';
    if (indexOf('foldersbefore') >= 0) then
      foldersBefore:=not isfalse(values['foldersbefore']);
    if (indexOf('linksbefore') >= 0) then
      foldersBefore:=not isfalse(values['linksbefore']);
    end;
if ansiStartsStr('!', v) then
  begin
  delete(v, 1,1);
  rev:=not rev;
  end;
if v = '' then exit;
case v[1] of
  'n': sortBy:=SB_NAME;
  'e': sortBy:=SB_EXT;
  's': sortBy:=SB_SIZE;
  't': sortBy:=SB_TIME;
  'd': sortBy:=SB_DL;
  'c': sortBy:=SB_COMMENT;
  else exit; // unsupported value
  end;
qsort( 0, length(dir)-1 );
end; // sort
Title: Re: Testing build #258
Post by: rejetto on March 13, 2010, 01:46:19 PM
go to menu >> other options >> defaut sorting
check by ext, then check by name  and save options

nice workaround

Quote
the problem can be solved by adding one line in main.pas
INITIALIZATION
defSorting:='name';

it would be a good solution for new installations.
sadly, old installations would load from the ini the "empty" value, that would overwrite your assignment.

so i changed
v:=first(def, defSorting);
in
v:=first([def, defSorting, 'name']);

this appears to be a very ugly problem to me. i guess i'm forced to publish a new build just to fix this.

Quote
I would like it's possible to add the possibility to overwrite the options foldersbefore and linksbefore in the main menu
The elegant solution is the following one:
http://url/?sort=n&rev&foldersbefore=1&linksbefore=0

ok
Title: Re: Testing build #258
Post by: JamiDodger on March 14, 2010, 11:22:40 AM
I found a problem with build 258, if you unchecked the enable box in user accounts, and apply and exit it wouldn't un-enable it, this is fixed in Build 259, this might just be the file
Title: Re: Testing build #258
Post by: Mars on March 14, 2010, 06:20:28 PM
Quote
so i changed
v:=first(def, defSorting);
in
v:=first([def, defSorting, 'name']);

this appears to be a very ugly problem to me. i guess i'm forced to publish a new build just to fix this.
nice solution , i wonder not to have thought of it, I had to not be in shape this day there  ;D
Title: Re: Testing build #258
Post by: rejetto on March 14, 2010, 10:29:37 PM
IMO, your suggestion is how it should have been since the beginning.
so, it's in a way better, but it doesn't fix previous users. that's all.