+ Reply to Thread
Results 1 to 6 of 6

Thread: Too many redirect error with UTF-8 characters in listing title

  1. #1

    Too many redirect error with UTF-8 characters in listing title

    Scenario

    Flynax Demo site
    Admin Panel:
    AP>Basic settings>General
    URL Transliteration -> disabled

    User Interface:
    Login as "dealer"
    My Listings -> Edit a listing like

    https://classifieds.demoflynax.com/m...oper-s-25.html

    Change listing title to an UTF8 text like: تست and save
    New listing address is : https://classifieds.demoflynax.com/motors/mini/cooper/تست-25.html
    https://classifieds.demoflynax.com/m...#1578;-25.html
    Everything seems OK
    Go to https://classifieds.demoflynax.com/motors/mini/cooper/mini-cooper-s-25.html
    It shows:

    This page isn't working
    classifieds.demoflynax.com redirects you too many times
    Try clearing your cookie
    ERR_TOO_MANY_REDIRECTS



    The problem is solved, If clear cookie by pressing CTRL+F5 key
    It seems there is something wrong with upup.sw.min.js file as a service worker from PWA plugin
    Last edited by Bahram Soltanirad; January 8, 2022 at 07:15 AM.

  2. #2
    EDIT:
    It only happens with Chrome and windows 7
    I Posted a report to chromium bug report.
    Last edited by Bahram Soltanirad; December 29, 2021 at 06:42 AM.

  3. #3
    Quote Originally Posted by Bahram Soltanirad View Post
    EDIT:
    It only happens with Chrome and windows 7
    I Posted a report to chromium bug report.
    Finally, they accepted , it is a bug. Below comments are from a chromium developer.

    The fact this is treated like a redirect loop seems likely a Chrome bug.
    Since there are multiple requests when gather a net-export log, instead of one request, it's likely a navigation stack issue, not a network stack issue.

    Able to reproduce the issue on reported chrome #96.0.4664.110 using Mac 11.6.1, Linux Debian and windows 10 by following steps as per C#0 & C#11. URL works first time. For subsequent run it displays "This page isn’t working". If cookies are cleared on second run, its WAI.

    Reproducible In


    Canary: 99.0.4797.0
    Dev: 98.0.4758.10
    Beta: 97.0.4692.71
    Stable: 96.0.4664.110
    Looks like the response is a redirect with must-revalidate (it make no sense to revalidate a redirect), a chunked encoded body (also weird, for a redirect). It's also being loaded as an "other" request type, instead of as a main frame, which seems likely wrong for a navigation request, unless perhaps a service worker is involved.
    It is a few days, i am waiting for a solution or response, but nothing at this moment.
    Last edited by Bahram Soltanirad; January 8, 2022 at 07:34 AM.

  4. #4
    After 30 days challenge with 6 chrome developers, finally i found cause of the problem and luckily a solution.
    The problem is a conflict between any service workers and unicode characters in location header.
    Unicode characters in location header is a RFC3986 violation and some browsers do a magic redirection loop.
    The solution is in function str2path in rlValid.class.php
    just after
    Code:
    Only registered members can view the code.
    add this line
    Code:
    Only registered members can view the code.
    It encodes url before sending it to the browser
    By the way, the chrome bug still exist and i am following it with chromium project members.
    But i recommend above correction to flynax team.

    EDIT: str2path function uses in other places like image names, username,... so it is better to not change above code and only change listing url in reefless.class.php

    find:
    Code:
    Only registered members can view the code.
    change to:
    Code:
    Only registered members can view the code.
    Flynax should confirm
    Last edited by Bahram Soltanirad; January 25, 2022 at 10:55 AM.

  5. #5
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello Bahram,

    Thank you for your effort

    but I couldn't reproduce the same on my local site, it redirects properly from تست-25.html to mini-cooper-s-25.html

  6. #6
    Thank you Rudi.
    No, it should be vice versa.
    Redirct from mini-cooper-s-25.html to 25-تست.htm
    Target URL should contain unicode.
    SW should be enabled too. Also chrome browser.
    Last edited by Bahram Soltanirad; January 28, 2022 at 12:12 PM.

+ Reply to Thread