Skip to content

Incorrect Content-Type in the API response from linting.org #37

@EtonDoze

Description

@EtonDoze

Expected: application/json
Actual: text/html

This even confuses Postman leading to render incorrectly.

Screen Shot 2022-08-17 at 4 25 42 PM

Screen Shot 2022-08-17 at 4 25 08 PM

Reproducible steps

~> curl -v https://rules.linting.org/rulesets/info/
*   Trying 172.67.136.246:443...
* Connected to rules.linting.org (172.67.136.246) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Aug 14 00:00:00 2022 GMT
*  expire date: Oct 15 07:37:18 2022 GMT
*  subjectAltName: host "rules.linting.org" matched cert's "*.linting.org"
*  issuer: C=US; ST=California; L=San Jose; O=PayPal, Inc.; OU=Crypto Mgt Corp EJBCA; CN=PayPal ZIA Issuing CA
*  SSL certificate verify ok.
> GET /rulesets/info/ HTTP/1.1
> Host: rules.linting.org
> User-Agent: curl/7.79.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 17 Aug 2022 23:23:09 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< last-modified: Mon, 01 Aug 2022 16:06:16 GMT
< access-control-allow-origin: *
< expires: Wed, 17 Aug 2022 23:29:42 GMT
< Cache-Control: max-age=600
< x-proxy-cache: MISS
< x-github-request-id: D3C0:62A8:B6AC3:CF2EA:62FD778E
< via: 1.1 varnish
< age: 0
< x-served-by: cache-lax10620-LGB
< x-cache: HIT
< x-cache-hits: 1
< x-timer: S1660778590.546976,VS0,VE97
< vary: Accept-Encoding
< x-fastly-request-id: 8924dfde4901754e2a22d63bcee72e7d3ccc5397
< CF-Cache-Status: DYNAMIC
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=lurDO%2FlodRQGlob4WJj9RSPCsU4dP2uPTsT5zBnJTjcarDxaix5sr2cNkcvA0AOrqrgwM30VzZI%2FZHAFNZ7y6W42GMyBi0EI7By5yjOzBySgJDmZtr0LOjkFyqMWYJyXVa0sEg%3D%3D"}],"group":"cf-nel","max_age":604800}
< NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< Server: cloudflare
< CF-RAY: 73c627e86b627c50-LAX
< alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
< 
{
"rules": {
    

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