~sircmpwn/gmni#15: 
Should not navigate to about:blank

gemini://gemini.conman.org/test/torture/0019

This is the only torture test we fail.

Status
REPORTED
Submitter
~sircmpwn
Assigned to
No-one
Submitted
10 months ago
Updated
6 months ago
Labels
No labels applied.

~earboxer 6 months ago

This issue also affects mailto: URLs

The bug is in the vendored code: It only treats a URL as absolute if it has :/ in it.

* Returns true if the given URL is absolute (as opposed to relative) within
 * the buffer size. Returns the scheme in the buffer if true and 'buf' is
 * non-NULL.
 */
bool Curl_is_absolute_url(const char *url, char *buf, size_t buflen)
{
  size_t i;
  for(i = 0; i < buflen && url[i]; ++i) {
    char s = url[i];
    if((s == ':') && (url[i + 1] == '/')) {
      if(buf)
        buf[i] = 0;
      return true;
    }

For reference, this is only true of URLs which conform to the "common internet scheme sequence", not to absolute URLs in general. https://tools.ietf.org/html/rfc3986#section-4.3

Register here or Log in to comment, or comment via email.