Skip to content

stackoverflow post fails to load #3340

Closed

Description

@metajack

task 'ScriptTask' failed at 'Failed to load page URL file:///Users/jack/src/static-suite/stackoverflow/Undo%20the%20last%20Git%20commit?%20-%20Stack%20Overflow.html, error: couldn't open file', dom/htmlbuttonelement.rs:53

I suspect this is related to the ? in the URL.

Activity

  1. metajack commented on Sep 15, 2014

    @metajack
    CollaboratorAuthor

    Blocks #3289

  2. jdm commented on Sep 15, 2014

    @jdm
    Member

    @SimonSapin Presumably ? should be encoded here before the rest is turned into a query string?

  3. SimonSapin commented on Sep 16, 2014

    @SimonSapin
    Member

    @metajack, how do you get to this error? I could reproduce it by letting my shell auto-complete mach run path/to/static-suite/stackoverflow/Undo<tab>

    As @jdm suggests, replacing ? with %3F in the file name works around the issue.

    Currently, command line arguments are parsed as URLs with the current directory (converted to a file: URL) as the base URL. ? and # have special meaning in URLs (start of query string or fragment identifier.) Instead, we might want to try to parse an absolute URL (without a base), and if that fails assume a filename and convert that.

    The question is, how do we want the command line to behave? On my machine, Chromium interpret relative filenames as such, but Firefox seems to be trying to guess an URL out of it with the first component as a domain name, appending .com and prepending www. when resolving fails.

  4. jdm commented on Sep 16, 2014

    @jdm
    Member

    Yes, I got this by autocompleting and running target/servo directly instead of via mach.

  5. added 2 commits that reference this issue on Sep 16, 2014
    0186a93
    11135d7
  6. added a commit that references this issue on Sep 19, 2014
    041d91c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions