Refresh header in redirectexit invokes white screen of death for some browsers

Started by mt, June 13, 2015, 03:54:23 PM

Previous topic - Next topic

mt

Several of my user reported strange behaviours with several firefox setups when doing logins/posts and other
actions which involves a POST and a redirect.

I use a heavy moded site and the SEF urls from portamx.

I found that SMF triggered for several POST events the header('Refresh: 0...) instead of the Location one for all browsers.
I am not sure that is done by default, by my settings or the mods but it triggered some effects.

Beside a noticable white flashing it also invoked some firefox browsers (the latest ones) to stop the redirect and showing a white screen of death.
That seems a side effect from different addons related to popup blocking and spam protection (which makes sense in some way) and will
only effect some browsers. Local i was never able to make it work but at last 2 users reported it with different addons.

Following this link the refresh header problem is known:
http://stackoverflow.com/questions/7294717/post-requesting-a-location-sending-refresh-header-makes-firefox-create-get-reque [nofollow]

Anway, no idea about this at all, i fixed it here by enforcing a location header but i think smf should removed the other one.
I can't see any positive effects with modern browsers today.


Oldiesmann

SMF uses the redirectexit() function to redirect users in most cases, and unless the 2nd parameter of this function is specifically set to true, it will use a location header. If you're running into refresh headers when logging in, posting, etc., it's due to mods and not a bug with SMF.
Michael Eshom
Christian Metal Fans

mt

I agree but please note:

- mods are "parts of the system"
- there is no need i can see for the refresh header

The fact is that calling this header will inflict on modern browsers strange effects like a white screen and no redirect.

When you ask "why is your code calling it" then the other question is "why is it callable in the smf code".

You must see this: People creating mods do not understood it obviously and call it. I got most the the mods
from the smf website itself.

Again: I found and fixed it and all works fine on my side.

But if people install smf, install some mods from the smf side and it hangs for them...
You really tell them in that case "do not use mods"?

That helps SMF not really...

Just to make it clear:

The used header is, when i understood it right, a relict from the IE/netscape war. There is no sense to have it in the code and when
you call it, why ever, it is not only slower today but also can invoke a real bug because every browser will use it by its own definition (thats
explained in the link in my first post) and firefox will bug out on some installs with a white screen.

So, the golden rule: If code is redundant, then remove it.

What are reasons and arguments to have it still in?

☠ DeadMan ☠

Quote from: mt on June 26, 2015, 08:08:37 AM
- mods are "parts of the system"

That is where you are mistaken.

The "system" is SMF as it is downloaded and installed.
Add mods, and it becomes modded. SMF team can not take every little mod that exists, and may exist in the future, into account when coding the "system". To do so, would take many more man hours of work, than is needed, due to the fact that not everyone uses every mod.
It would also take a team of mind readers, to know what future mods may come out. ;)

Suki

Quote from: mt on June 26, 2015, 08:08:37 AM
I agree but please note:

- mods are "parts of the system"
- there is no need i can see for the refresh header

The fact is that calling this header will inflict on modern browsers strange effects like a white screen and no redirect.

When you ask "why is your code calling it" then the other question is "why is it callable in the smf code".

You must see this: People creating mods do not understood it obviously and call it. I got most the the mods
from the smf website itself.

Again: I found and fixed it and all works fine on my side.

But if people install smf, install some mods from the smf side and it hangs for them...
You really tell them in that case "do not use mods"?

That helps SMF not really...

Just to make it clear:

The used header is, when i understood it right, a relict from the IE/netscape war. There is no sense to have it in the code and when
you call it, why ever, it is not only slower today but also can invoke a real bug because every browser will use it by its own definition (thats
explained in the link in my first post) and firefox will bug out on some installs with a white screen.

So, the golden rule: If code is redundant, then remove it.

What are reasons and arguments to have it still in?

I understand your reasons and I agree, there are really no arguments and/or reasons why we still have a redirect header other than the code base showing its age.

I'll see what I can do on SMF 2.1 to change its behavior to not rely on it. Thanks for the report.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: