tnct-spc / procon2014

25th-Kosen-Procon Competition
MIT License
8 stars 0 forks source link

serverの404レスポンスがアレ #17

Closed godai0519 closed 9 years ago

godai0519 commented 9 years ago

存在しないppmにリクエストすると,

HTTP/1.0 404 Content-Length: 13 Content-Type: text/plain

404 Not found

NTSC-J commented 9 years ago

どうすればいいの

godai0519 commented 9 years ago

この間みたいな感じだと思う. 取得待機の,200をもらえるまで叩きつけるコードが落ちるので見つけた.

NTSC-J commented 9 years ago

??? 存在しないppmにアクセスされたら404以外返しようがないんだけど……

godai0519 commented 9 years ago

×HTTP/1.0 404 ○HTTP/1.0 404 Not found

NTSC-J commented 9 years ago

うちの環境で再現しないんだけど……

godai0519 commented 9 years ago

sudo PORT=80 ../bin/release/pcserverで立ち上げて, 存在しないppm (http://127.0.0.1/problem/prob99.ppm) のHTTPレスポンス読めば, やっぱり


HTTP/1.0 404 Content-Length: 13 Content-Type: text/plain

404 Not found

になってるんだけど,そっちは違うの?

NTSC-J commented 9 years ago

違う

% nc localhost 80 GET /problem/prob99.ppm HTTP/1.0

HTTP/1.0 404 Not found Content-Length: 13 Content-Type: text/plain

404 Not found

NTSC-J commented 9 years ago

ちなみに

% nc localhost 80 GET /hogehoge HTTP/1.0

HTTP/1.1 404 Not Found Content-Length: 14 Content-Type: text/plain

404 Not Found

godai0519 commented 9 years ago

ごめん. mongooseのレポジトリをpullしたら,解消した. 修正以前のmasterだったのね.というか,治ったの最近なのか……