Closed theit8514 closed 3 years ago
👋 I just ran curl -H 'Cache-Control: no-cache' https://api.cdnjs.com/libraries/highlight.js | jq
locally (piping into jq to validate the JSON), and this is returning completely valid JSON for me.
If you could provide a full response headers dump for the invalid response, that'd be great!
HTTP/2 200
date: Tue, 17 Aug 2021 20:30:12 GMT
content-type: application/json; charset=utf-8
access-control-allow-credentials: true
access-control-allow-origin: *
cache-control: public, max-age=21600
etag: W/"3b7577-5/xK/ndRckL3O36agHf8NLOno4g"
expires: Wed, 18 Aug 2021 01:48:59 GMT
vary: Accept-Encoding
cf-cache-status: HIT
age: 2473
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=BnkHyZ%2Fvn0Ly2OB5ZhvRu4F2w25Xt0TOZWz8WFWGHYQaMcupKgwDY3%2BWf9VWdSTiYJlwGD9vgJndop%2FM%2FcxJamR5QPSLmNzvr%2FKVN1pgqymV729%2FoLSWk21umPQPpOk%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
server: cloudflare
cf-ray: 6805a8b26c49f1c2-ATL
Thanks -- the team are looking into it!
Hi @theit8514,
It looks like for some reason a bad response was in a cache somewhere -- we've purged the cache, so hopefully, all should be good now! Could you check and confirm?
We've verified the responses from the API origin servers directly, as well as through the public API URL above and we can no longer reproduce the issue on our end.
Yes, that has fixed the issue for me as well. Thanks.
Help request
Problem
Highlight.js returning invalid JSON data. URL: https://api.cdnjs.com/libraries/highlight.js Error: SyntaxError: JSON.parse: unterminated string at line 1 column 2626990 of the JSON data
What I have tried
Tried using CURL to fetch with cache control set to no-cache and still returns the same invalid JSON.
curl -H 'Cache-Control: no-cache' https://api.cdnjs.com/libraries/highlight.js --trace-asci output.txt
output.txt