例:
static void send_r_unauthorized()
{
    printf("Status: 401 Unauthorized\r\n");
    printf("WWW-Authenticate: Basic realm=\"Secure Area\"\r\n");
    printf("Content-Type: text/html; charset=ISO-8859-1 \r\n\r\n"); /* terminate header */
    printf(" 401 Unauthorized \n");
    printf("

401 Unauthorized

\n ");
    printf("Your client does not have permission to get URL from this server.\n \r\n\r\n");
    exit(0);
}

參考資料1

參考資料2
arrow
arrow
    全站熱搜

    JohnDX 發表在 痞客邦 留言(0) 人氣()