Git Product home page Git Product logo

Comments (7)

MasterQ32 avatar MasterQ32 commented on May 24, 2024

I cannot reproduce this, can you show me a real-world example?

My test file (/html/rel.htm) is:

<!doctype html>
<html>
  <body>
    <a href="../text/utf-8.txt">../text/utf-8.txt</a>
    <a href="/text/utf-8.txt">/text/utf-8.txt</a>
    
  </body>
</html>

Both links resolve to the same file, both served via gemini and http

from kristall.

waweic avatar waweic commented on May 24, 2024

Sorry I'm late with my reply, I have now put up an example on a page of mine.

This link does work as expected: https://tilde.ism.rocks/~waweic/kristall-relative-link-testbed/ (This one has a trailing /)
This link does not: https://tilde.ism.rocks/~waweic/kristall-relative-link-testbed

from kristall.

MasterQ32 avatar MasterQ32 commented on May 24, 2024

Hm, i still cannot reproduce this. Both links work as expected. The first one (trailing /) will yield the index site directly, the other one will react to the redirect from the server and will also land on the site with the trailing /

from kristall.

waweic avatar waweic commented on May 24, 2024

The server is not redirecting me. It just delivers the page without the trailing / to the browser. When I access the URL from the second link, the address bar does not have a trailing / in it.

Clicking the link on that website is what only works for me on the page with the trailing /

from kristall.

MasterQ32 avatar MasterQ32 commented on May 24, 2024

Please check your redirection settings. Visiting https://tilde.ism.rocks/~waweic/kristall-relative-link-testbed yields

HTTP/2 301 
server: nginx/1.14.0 (Ubuntu)
date: Fri, 03 Jul 2020 08:12:37 GMT
content-type: text/html
content-length: 194
location: https://tilde.ism.rocks/~waweic/kristall-relative-link-testbed/
content-security-policy: default-src 'self'; script-src 'none';

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html>

Which is obviously a redirection, whereas visiting https://tilde.ism.rocks/~waweic/kristall-relative-link-testbed/ yields

HTTP/2 200 
server: nginx/1.14.0 (Ubuntu)
date: Fri, 03 Jul 2020 08:13:39 GMT
content-type: text/html; charset=UTF-8
content-length: 92
last-modified: Wed, 01 Jul 2020 11:09:06 GMT
etag: "5efc6ed2-5c"
content-security-policy: default-src 'self'; script-src 'none';
accept-ranges: bytes

<html>
<body>
<a href="site-next-to-index.html">site-next-to-index.html</a>
</body>
</html>

which is the site you're talking about. Kristall is following redirections by default, but you can change this behaviour in the settings

from kristall.

waweic avatar waweic commented on May 24, 2024

Sorry. My fault. When I discovered that behaviour, I was using an older version that didn't implement redirections, apparently. I built it from master again, now it's working

from kristall.

MasterQ32 avatar MasterQ32 commented on May 24, 2024

No worries. It would've been my next question, but bugs can happen everywhere!

from kristall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.