Skip to content

YAML download for "View Permissions" results does not suggest filename #545

@briandfoy

Description

@briandfoy

When downloading the YAML file linked at the bottom of the "View Permissions" page, the filename is authenquery. The content type is application/octet-stream and no filename is suggested. Here's the response header:

$ curl "https://${PAUSEID}:${PAUSEPASS}@pause.perl.org/pause/authenquery?ACTION=peek_dist_perms&OF=YAML&pause99_peek_dist_perms_sub=1&pause99_peek_dist_perms_by=a&pause_peek_dist_perms_query=ADOPTME" -v
* Host pause.perl.org:443 was resolved.

... lots of stuff ...

* Request completely sent off
< HTTP/1.1 200 OK
< Server: nginx/1.22.1
< Date: Wed, 01 Jan 2025 17:28:13 GMT
< Content-Type: application/octet-stream
< Content-Length: 5956
< Connection: keep-alive
< Vary: Accept-Encoding
< Pragma: no-cache
< Cache-Control: no-cache

YAML now has application/yaml as defined by RFC 9512, and there are various tricks to suggesting the filename (although I wouldn't try that hard to please all browsers).


As a bonus, I found yaml2json:

$ curl ... | yaml2json | jq ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions