Important: Please read the Qt Code of Conduct -

# in URL

  • I have some code that works on one system but not others. The system where it works is a Mac with development libraries, other systems I have tried include a PC with development libraries, as well as other Macs and PCs that just have release builds.

    The code builds a URL that looks like this:

    The page is then loaded with setUrl (I have also tried load and show, but same behavior)

    On one system this works fine, but on other systems the page is not loaded.

    Googling, I found this:

    When the URL contains the # I see this in the nginx log:

    POST /workitem/67876029556368716590/report

    And the request is successfully served.

    But when the URL does not have the # I see this in the log:

    GET /workitem/67876029556368716590
    And that returns the 404.

    So my questions are this:

    What does the # mean in this context?
    Why is it required for this URL to be recognized?
    Why does it work on one system and not the otherss? Is it that bug in the link?

    The webserver is nginx, and the framework is falcon.

    If I type the URL into the browser's address bar (with the #) it works on all systems. And without the # it does not work on either.

    Thank you!

  • I did find out what was happening. The # was coming through correctly on all systems, but jquery was not installed on all systems which made it look like the URL wasn't handled correctly. I used the web view inspector to determine this, and have set it up on the server to provide jquery to the client rather than requiring the client to already have it, so it is fixed. Others may run into this also, so I am completing the record in case it helps anyone else.


Log in to reply