rejetto forum

Server returns 301 for a valid directory

Dave987 · 24 · 16256

0 Members and 1 Guest are viewing this topic.

Offline Dave987

  • Occasional poster
  • *
    • Posts: 25
    • View Profile
Well, thank you for continuing to try, Mars!  I thought it odd as well, although I still don't know nearly as much as you about this.  Intermittent problems are the worst! 
By the way, I wasn't paying close attention, but it seems that most, if not all of the times  received the error, I was using IE.  I also use Firefox and Opera (12.16), however, so it might have happened on these as well.  I wouldn't think a 200 packet, or anything else could be mistaken for a 301, but I suppose it might be something to keep in the back of our minds.


Offline Dave987

  • Occasional poster
  • *
    • Posts: 25
    • View Profile
Well, I'm back to getting this problem from time to time.
It's happened to me a couple times now, right when a web page passes be off the the default file management system.  I don't know what more info I can add other than that I'm using Firefox this time. Again, though,I really see no way the browser could cause the issue.


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
i doubt it, but this could be caused by the HFS Cookie session ID...
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline Dave987

  • Occasional poster
  • *
    • Posts: 25
    • View Profile
i doubt it, but this could be caused by the HFS Cookie session ID...

I'm afraid I don't know what the Cookie session ID even is. You could be right, but how could I find out?  Sorry, I'm still leaning some of the basics here.


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
http://www.rejetto.com/forum/html-templates/troubleshooting-hfs-cookie-issues-on-rename-in-the-default-template/

a cookie is created by the browser once it is coneted to the HFS site, there have beeen some problem with teh template doing things liek the post above. in that post, the user SKB, was having problems renaming a file, and it turened out to be a bad cokkie.

The cokie in HFS, generates a session ID, in whcih for password protected items can be a cause for links and access to folder paths.

right click the house "/" and go to properties > different tempalt tab, ad this to the info:

data.token = getCookie('HFS_SID');

this lin once going to the home page or "/" will show a sting number, that is your session ID.

Because the cookie can be used in how the fiel is accessed, i belive the cookie can be casueing a problem. It is also very unlilkey as one of the admins "Mars" has been tyring to repoduce your issue, but not having much luck in fidning the error.

i'd have to go looking fo r it, but there was a "fix" for the cokkie generation in wicth the template would "reset and delete it and recreate the cokkie....

BUT, that is IF the 301 error is coming form the cokkie. I hvae yet to see a 301 on HFS.
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline Dave987

  • Occasional poster
  • *
    • Posts: 25
    • View Profile
I knew the basics of cookies, but not specifically about the ID, so it's good to know--thanks!
It's good to know how to get the session ID, but once I do, what do I do with it? How can I tell if it's bad?

I know Mars really did try to find the issue with this before, and I appreciated it!  Once I updated last time from F to G, the problem did vanish for a while...then it came back.

I don't want to openly post my IP, but if Mars or another SysOp is trying to connect, it is hosting from this IP on port 8888.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i wouldn't mind the cookie.
I think it may be just your IE version. Can't you restrict your problem to a specific browser version, by testing?

HFS should send that page only when a folder is requested without the trailing /

Code: [Select]
if f.isFolder() and not ansiEndsStr('/',url) then
    begin
    conn.reply.mode:=HRM_MOVED;

I suspect that browser is automatically removing the / for some strange reason.


Offline Dave987

  • Occasional poster
  • *
    • Posts: 25
    • View Profile
I experienced this problem is IE 9, Firefox 43.x.x.x and Opera 12.16.
The most recent time I experienced this might actually have been my own stupidity.  I had changed some HTML code, and left out a "/" on one link.  I fixed this, and so far it's been working alright.  However, this could have been the issue only this once.  Before I'm pretty sure it was something else.

I guess we can call this one "resolved" for now anyway.


Offline Fysack

  • Tireless poster
  • ****
    • Posts: 598
  • present picture
    • View Profile
    • Admin
 ;D ;D ;D ;D ;D Mars, yea, no,  .. it nnnooot f n y  ;D ;D ;D
GOD CAN READ YOUR MIND