Skip to content

Inconsistent redirect behaviors for platform-specific items #3329

Description

@tonywu6

Hello! I found some cases, related to platform-specific items, where docs.rs doesn't reliably redirect to the search page when the requested item doesn't exist.

(I imagine most of these only really happen if someone's writing URLs by hand. I found them while experimenting with programmatically generating links to docs.rs for my project)


On this topic I also have a question/proposal: Would it make sense or be feasible, when the URL doesn't specify a target, to try locating the item in all targets, and redirect to the first target if the item was found?

Still using nix as an example: nix@0.31.2 has x86_64-unknown-linux-gnu as the default target, which doesn't have the item nix/sys/termios/fn.cfmakesane.html, but the target x86_64-unknown-freebsd does:

So instead of interpreting a URL without a target as "the default target," perhaps interpret it as "target unspecified"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-designStatus: There's a problem here, but no obvious solution; or the solution raises other questions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions