Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URLBase without trailing '/'
#1
While switching a project to http.sys I noticed some odd behavior while testing (but http.sys is not the issue, problem also occurs in Indy mode).  

If you use 'URLBase' and reference the url without a trailing '/' the main page will load and the url in the browser will now display a trailing '/'.  If you reference the url again without a trailing '/the main page will load but a new session is created instead of using the original one.  In my case I just bookmarked the app without the '/' and I was able to create a couple hundred orphaned sessions with one minute of clicking the link.  I created a new, default IW project and the result is the same. A work around is to use an 'IWServerControllerBaseBeforeNewSession' event but then you get 404 without the trailing '/', not ideal.

[Image: 2019-10-13_13-42-01.png]
Reply
#2
Are you using cookies?

Why are you using URLBase with Indy project (i.e. do you have a reverse proxy)?
Reply
#3
I can't recreate this behavior with any Http.sys application from our test cases. If you try the demos on github you get a 404 as soon as you try to start a new session without the trailing slash...
Reply
#4
Attached is a new, default (with URLBase), http.sys project created from C++ Builder 10.3.2 IW 15.1.5.  To reproduce:
  • Run app, F9 for default browser, 1 session created.
  • In browser backspace over url trailing '/', press Enter: another session created and so on.
  • Or, bookmark url without trailing '/':  new session for every click.


Attached Files
.zip   IWTEST.zip (Size: 58.04 KB / Downloads: 4)
Reply
#5
Yes, I can confirm that it behaves as you propose, but only in Chrome. Firefox doesn't do that.

We have a fix in place and it will be available in the next release.

Cheers
Reply
#6
>>Yes, I can confirm that it behaves as you propose, but only in Chrome. Firefox doesn't do that.

I see it in Edge also.


>>We have a fix in place and it will be available in the next release.

Thanks Alexandre.
Reply
#7
It is fixed in IW 15.1.7. Please update
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)