35

I get the following error on Safari (Version 9.1.2 (11601.7.7)) (and something similar on Google Chrome(Version 52.0.2743.116 (64-bit))):

Too many redirects occurred trying to open “‎stackoverflow.com/documentation/bash/4797/internal-variables/16885/%24%23+”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

How to reproduce?

  1. Go to https://stackoverflow.com/documentation/bash/topics.
  2. Click 31 more examples in the Internal variables section.
  3. Here it is.

All the other [:digit:+] more examples links seem to work fine.

11

2 Answers 2

12

As @fedorqui just verified, the issue is related to a trailing space in an example title.

Trailing spaces in example titles should thus be trimmed away when submitting to avoid this issue. There is no reason why they should be there at all as browsers render them away when displaying.

3
  • Shouldn't we notify the SE dev team about this issue as well? Aug 29, 2016 at 9:56
  • 14
    They are supposed to track the bugs tag and should find it themselves
    – bwoebi
    Aug 29, 2016 at 9:57
  • 4
    @MateuszPiotrowski Your bug report is all the notification we need. :)
    – Adam Lear StaffMod
    Aug 30, 2016 at 0:37
4

Yep, as y'all have figured out by now, the trailing space is the problem here. In theory, this should still work as decoding should produce the same title as what we have stored. Unfortunately, %24%23+ comes through to an ASP.NET route as $#+, which of course isn't equal to the properly decoded title $#<space>... and then we try to fix the URL and redirect correctly... which lands us in the infinite loop.

I pushed a fix for URLs of existing topics and examples, as well as a change to trim titles for new topics and examples going forward. With you in the next SO build (rev 2016.8.29.3935).

Not the answer you're looking for? Browse other questions tagged .