Skip to content

The path of a URI with an authority must start with a slash "/" or be empty #501

@grandeljay

Description

@grandeljay

Not sure if this is an issue for Guzzle, but I'll start here since I am curious of your opinion on this.

When fetching this URL: https://kipli.com/fr/product/matelas-bebe-bio/ (https://oscarotero.com/embed/demo/index.php?url=https%3A%2F%2Fkipli.com%2Ffr%2Fproduct%2Fmatelas-bebe-bio%2F&settings=)

My app returns a warning: The path of a URI with an authority must start with a slash "/" or be empty. After some digging, I found that the source code of the site seems to be invalid. In particular the alternative languages:

<link data-n-head="ssr" rel="alternate" hreflang="en_dk" href="undefined">

The locale for en_dk has undefined set for the href. And I believe this is the cause of the warning I am getting. Your demo seems to work fine but I have

$foo = $embedInfo->languages

inside a try/catch which is then failing. Because undefined is not a valid URL/URI.

My question is if you can/should handle this and determine if the href is valid?

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