Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Wrong URL, failed redirection when using the mod:// with sections (hashes)

by bliako (Monsignor)
on Feb 22, 2023 at 20:02 UTC ( [id://11150537]=monkdiscuss: print w/replies, xml ) Need Help??

The following metacpan directive (mod://) does not work for me make_schema_at of DBIx::Class::Schema::Loader, it should redirect to https://metacpan.org/pod/DBIx::Class::Schema::Loader#make_schema_at. But it sends me to this: https://metacpan.org/pod/DBIx%3A%3AClass%3A%3ASchema%3A%3ALoader%23make_schema_at

But (on modern Firefox) when I hover over the link I see that it points to the correct url. On modern Chrome it fails as well, but the hover has %3A and %23.

bw, bliako

  • Comment on Wrong URL, failed redirection when using the mod:// with sections (hashes)
  • Download Code

Replies are listed 'Best First'.
Re: Wrong URL, failed redirection when using the mod:// with sections (hashes)
by cavac (Parson) on Feb 27, 2023 at 07:32 UTC

    Ah yes, the joys of URL encoding. Had to solve a similar problem in my own webserver software. Technically, it has to treat the URL in parts, encode them seperately and join the parts with the currect delimiters.

    What is happening here is that the hash sign # gets encoded when it shouldn't be if i remember my HTTP specs correctly. This is a common problem and some browsers provide workarounds, some don't. Plus, some websites/webservers also have workarounds for some (though not all) encoding problems.

    What's even more vaxxing about this specific issues is that part of the URL needs to be parsed by the webserver and a part of it (the #make_schema) is to be interpreted by the browser as a hint to scroll down to a specific line in the returned document.

    I technically have the rights to fix this in the PerlMonks code, but i have absolutely no idea where the encoding of URLS is happening.

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

      The place to start would be handlelinks settings. Scroll through the most recent patches, as I believe this fix has been made to at least one shortcut type not too long ago. Thanks!

      Today's latest and greatest software contains tomorrow's zero day exploits.

        I submitted a patch. If it actually works is anyones guess ;-)

        I'm fluent in Perl, but PM has it's own way of doing things. Aaaand it's officially my first real patch to PM. So far, i've been a "readonly" PMDev.

        PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
Re: Wrong URL, failed redirection when using the mod:// with sections (hashes)
by bliako (Monsignor) on Mar 08, 2023 at 13:42 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://11150537]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-16 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found