Skip to content

Instantly share code, notes, and snippets.

@shimizukawa
Last active April 15, 2021 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shimizukawa/32526648950edfc1ef3b867240c04b40 to your computer and use it in GitHub Desktop.
Save shimizukawa/32526648950edfc1ef3b867240c04b40 to your computer and use it in GitHub Desktop.
Flaskのhttpポートにhttps通信したときのログ
(venv) $ FLASK_APP=run.py flask run
* Serving Flask app "run.py"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
## ここから http://localhost:5000/ でアクセスしたログ
127.0.0.1 - - [16/Apr/2021 07:41:17] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [16/Apr/2021 07:41:18] "GET /favicon.ico HTTP/1.1" 404 -
## ここから https://localhost:5000/ でアクセスしたログ
127.0.0.1 - - [16/Apr/2021 07:41:23] code 400, message Bad request version ('\x0f{ò=2\x00')
127.0.0.1 - - [16/Apr/2021 07:41:23] "üÏj7öã@26tN·”&?
ÉÑÇ:}®gc)Zbs ß0þ ëBJ-Q¢ Â_¢Ï'f©jÍG×
{ò=2 " HTTPStatus.BAD_REQUEST -
127.0.0.1 - - [16/Apr/2021 07:41:23] code 400, message Bad request version ('localhost\x00\x17\x00\x00ÿ\x01\x00\x01\x00\x00')
127.0.0.1 - - [16/Apr/2021 07:41:23] "üŠ‘Ó‰F¤JIp"&ú(Ø6‹„/¦ÖD~UòB¬Í”Õ@ òˆ9”ûâeõÿ„jãAÙ7qÞ÷±Šñw˜p@k„A ššÀ+À/À,À0̨̩ÀÀœ/5“JJ
localhostÿ" HTTPStatus.BAD_REQUEST -
127.0.0.1 - - [16/Apr/2021 07:41:23] code 400, message Bad request version ('ñ»ÑÒã3ÒÉ\x08\x18\'¬µ\x9f@Î\x00"')
127.0.0.1 - - [16/Apr/2021 07:41:23] "ü¶RUAóÔ^¼A$?O,ï1í]´´@{ºu·Ç: å,}º£¶ˆƒ]m7]±÷õ ñ»ÑÒã3Ò'¬µŸ@Î"" HTTPStatus.BAD_REQUEST -
127.0.0.1 - - [16/Apr/2021 07:41:23] code 400, message Bad request version ('7g!\x83½!ZHVûy\x9ccð\x00"zz\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x00')
127.0.0.1 - - [16/Apr/2021 07:41:23] "ü—<Ò9į,äà@‡ûViEW9Ȭß!BEDSä  ×'9¨€Eߗu%©×È7g!ƒ½!ZHVûyœcð"zzÀ+À/À,À0̨̩ÀÀœ/5" HTTPStatus.BAD_REQUEST -
click==7.1.2
Flask==1.1.2
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
Werkzeug==1.0.1
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment