Comments (8)
I suppose there's no harm in us attempting to parse a plain text content response, that way it'd account for things like GitHub Gists.
from cssstats.
In a previous run /stats
would return a 500 with an error message but I cannot reproduce that anymore unfortunately.
from cssstats.
Looks like this has to do with the fact that gist return text/plain
for .txt files.
$ curl -I https://gist.githubusercontent.com/kolaente/7c3e8e7c91f0409c2fed2182ee547605/raw/dcb3e35fce01ec411144917269d64f26bc176348/gistfile1.txt
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: "fc09f93056511600514aa9727f872a9d4229914bd6602d911bb7260866fc0ad9"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: EAC2:2C27:1AA66E:20E1B7:606E2040
accept-ranges: bytes
date: Wed, 07 Apr 2021 21:12:32 GMT
via: 1.1 varnish
x-served-by: cache-phx12423-PHX
x-cache: MISS
x-cache-hits: 0
x-timer: S1617829953.585614,VS0,VE115
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
x-fastly-request-id: ffbaef3a793db1cd4a657c71a27f1c8612f3677f
expires: Wed, 07 Apr 2021 21:17:32 GMT
source-age: 0
content-length: 50517```
from cssstats.
@johno I've change the ending to .css
but the gist still returns text/plain
for the header:
$ curl -I https://gist.githubusercontent.com/kolaente/7c3e8e7c91f0409c2fed2182ee547605/raw/a094fd59d63e96447360a87cbac78178aae94775/styles.css
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: "fc09f93056511600514aa9727f872a9d4229914bd6602d911bb7260866fc0ad9"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: 1A8E:728B:79039A:7E2589:606E25C5
accept-ranges: bytes
date: Wed, 07 Apr 2021 21:36:05 GMT
via: 1.1 varnish
x-served-by: cache-fra19165-FRA
x-cache: MISS
x-cache-hits: 0
x-timer: S1617831366.578418,VS0,VE186
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
x-fastly-request-id: 12b82f7e352f789c8c3418970e4a2fe7d3e778c1
expires: Wed, 07 Apr 2021 21:41:05 GMT
source-age: 0
content-length: 50517
So I guess the bug actually is in cssstats somewhere?
from cssstats.
The site itself is (not yet) live by the way which is the reason why I can't just use a public accessible css file somewhere. (ofc I could try to host it properly somewhere else but the gist was the quickest way to check for me).
from cssstats.
Just checked on cssstats.com with the .css
file and it doesn't seem to care for the ending which supports the thesis with the content-type
.
from cssstats.
Yeah I think at some point we should prioritize adding in a CSS input so folks with files that aren't publicly hosted have the ability to still get the stats back. But right now we don't support that unfortunately.
Related to #294
from cssstats.
Do you think it could be an easy enough fix to make the parser ignore the content type?
from cssstats.
Related Issues (20)
- Navigation: Add back section IDs HOT 3
- ERROR #98123 WEBPACK HOT 2
- Specificity graph not visible in dark mode HOT 2
- Stats doesn't work properly with CSS variables HOT 4
- Some sites fail to analyze HOT 12
- 502 bad gateway against a site HOT 1
- Location of reported items in source CSS [FEATURE REQUEST] HOT 2
- How to copy paste CSS code and then analyzie via CSSstats? HOT 1
- `/stats` endpoint is accessible and shows infinite loading HOT 2
- Impossible have stats in authenticated pages HOT 6
- Unexpected error occured HOT 1
- Remove CSS field in stats response for the API
- Feature Rewu
- Adding custom user agent to request HOT 1
- [BUG] Failing to collect selectors with declaration that only has custom properties HOT 3
- Failing URLs
- Failing URL
- No longer maintained? HOT 2
- The website is crashed after typing a url address HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cssstats.