chubin / cheat.sh

the only cheat sheet you need
https://cheat.sh/
MIT License
38.2k stars 1.78k forks source link

500 Internal Server Error when send request to https://cht.sh/:shell-x/ #381

Open atk1432 opened 1 year ago

atk1432 commented 1 year ago

When I send request to https://cht.sh/:shell-x/, I receive internal server :

$ curl https://cht.sh/:shell-x/ -v < HTTP/1.1 500 INTERNAL SERVER ERROR < Server: nginx/1.13.12 < Date: Tue, 18 Apr 2023 09:53:32 GMT < Content-Type: text/html; charset=utf-8 < Content-Length: 290 < Connection: keep-alive

bayram-dev commented 1 year ago

Same thing for now

curl cht.sh/rust/:learn/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

verbose curl

< HTTP/1.1 500 INTERNAL SERVER ERROR
< Server: nginx/1.13.12
< Date: Tue, 06 Jun 2023 14:44:36 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 290
< Connection: keep-alive
ask1234560 commented 1 year ago

hi guys, i am also getting the same.

curl 'cheat.sh/yt-dlp'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
codelikeachode commented 1 year ago

I am also getting the same issue.

curl https://cht.sh/:shell-x/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

verbose curl

< HTTP/1.1 500 INTERNAL SERVER ERROR
< Server: nginx/1.13.12
< Date: Wed, 07 Jun 2023 04:04:15 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 290
< Connection: keep-alive
bayram-dev commented 1 year ago

@atk1432 @codelikeachode @ask1234560 and others

just self-hosted my own cheat sheet at https://ch.batagiev.ru/ (yeah, not as short as it was, but at least something that works)

Might host it till original works

chubin commented 1 year ago

I will try to fix the problem today. It is a hardware issue

chubin commented 1 year ago

Please check again

bayram-dev commented 1 year ago

Works like a charm, thx

abitrolly commented 1 year ago

https://cht.sh/:shell-x/ still gives 500. https://cht.sh/rust/:learn/ gives 404.

bayram-dev commented 1 year ago

Hmm, strange behaviour. Adding slash after user query return 404.

curl -I https://cht.sh/rust/:learn | grep HTTP
HTTP/1.1 200 OK

And

curl -I https://cht.sh/rust/:learn/ | grep HTTP
HTTP/1.1 200 OK

Edit: returns 404 with status code 200 :laughing:

But for some reason webview show 404 with slash and actual result with 200 without slash

:shell-x => Unknown topic.

bayram-dev commented 1 year ago

My guess is https://github.com/chubin/cheat.sh/blob/571377f2f79422398a701cb1864487124ec3dcc6/bin/app.py#L231 makes error, which is described in Flask docs, trailing slash

The canonical URL for the projects endpoint has a trailing slash. It’s similar to a folder in a file system. If you access the URL without a trailing slash (/projects), Flask redirects you to the canonical URL with the trailing slash (/projects/).

Might try to check it tomorrow.

abitrolly commented 1 year ago

If not that, then the code should end in https://github.com/chubin/cheat.sh/blob/571377f2f79422398a701cb1864487124ec3dcc6/lib/cheat_wrapper.py#L93-L96 and fail somewhere around here.

evrial commented 11 months ago

Looks like this project is ded. Tests are failing, 500 error. 1GB of ballast code sources from Rosetta code is unsearchable I don't see a single reason to write double tests in pytest and bash. Can you explain?

curl cht.sh/python/Dijkstras-algorithm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

Self-hosted:

cht.sh> python Dijkstras-algorithm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
matenestor commented 9 months ago

I am still having the problem as well

> cht python tutorial
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
foodornt commented 9 months ago

ah, down again?

mpsanders commented 3 months ago

Failing for curl cht.sh/flutter/swipe+gesture

image
abitrolly commented 3 months ago

I can confirm it is 503 for web too https://cht.sh/flutter/swipe+gesture

@chubin any ideas?

chubin commented 3 months ago

Please try again