私のサーバーは、本文を含むサンプルの応答ヘッダーをリクエストに送信しています。
static char* not_found_response_template =
"HTTP/1.1 404 Not Found\n"
"Content-type: text/html\n"
"\n"
"<html>\n"
" <body>\n"
" <h1>Not Found</h1>\n"
" <p>The requested URL was not found on this server.</p>\n"
" </body>\n"
"</html>\n";
len = strlen(not_found_response_template);
send(newSct, not_found_response_template, len, 0);
正しく送信されていますが、転送をキャンセルするまでFirefoxはロードを続けます。
FirefoxプラグインHttpRequestHelperはこれを示しています:
GET localhost:6666
--response --404 Not Found Content-Type:text / html
コンテンツが読み込まれないのはなぜですか?