Author Topic: Server returns 301 for a valid directory  (Read 7742 times)

0 Members and 2 Guests are viewing this topic.

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #15 on: October 27, 2015, 02:07:03 PM »
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

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #16 on: March 18, 2016, 04:45:33 PM »
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

  • Insane poster
  • *****
  • Posts: 750
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Server returns 301 for a valid directory
« Reply #17 on: March 18, 2016, 10:22:30 PM »
i doubt it, but this could be caused by the HFS Cookie session ID...
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #18 on: March 18, 2016, 11:44:33 PM »
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

  • Insane poster
  • *****
  • Posts: 750
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Server returns 301 for a valid directory
« Reply #19 on: March 19, 2016, 08:24:35 AM »
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.
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #20 on: March 19, 2016, 04:15:42 PM »
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
  • Insane programmer
  • *
  • Posts: 12844
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #21 on: March 23, 2016, 05:26:31 PM »
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

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #22 on: April 07, 2016, 10:46:06 PM »
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

  • Insane poster
  • *****
  • Posts: 587
  • present picture
    • View Profile
    • Admin
Re: Server returns 301 for a valid directory
« Reply #23 on: September 30, 2017, 05:21:39 PM »
 ;D ;D ;D ;D ;D Mars, yea, no,  .. it nnnooot f n y  ;D ;D ;D
GOD CAN READ YOUR MIND