C Winsock Post请求

C Winsock Post请求,c,http,winsock2,C,Http,Winsock2,我正在尝试向我的服务器发送post请求,但我一直收到此错误: HTTP/1.1 400 Bad Request Date: Sun, 11 Jan 2015 02:16:57 GMT Server: Apache/2.4.4 (Win64) PHP/5.4.12 Content-Length: 325 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//

我正在尝试向我的服务器发送post请求,但我一直收到此错误:

HTTP/1.1 400 Bad Request
Date: Sun, 11 Jan 2015 02:16:57 GMT
Server: Apache/2.4.4 (Win64) PHP/5.4.12
Content-Length: 325
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Request header field is missing ':' separator.<br />
<pre>
cmd=connect&amp;computer=derp\r\n</pre>
</p>
</body></html>

为什么我会收到这个错误?

你在
Con*t*entlength
headername中输入了错别字我是个混蛋。谢谢
void postReq(SOCKET sock, char *host, char *dat) {
    char postDat[5001];
    char postData[5001];
    sprintf(postDat, "POST /search/api.php HTTP/1.0\r\n"
               "Host: %s\r\n"
               "Content-type: application/x-www-form-urlencoded\r\n"
               "Conent-length: %d\r\n\r\n"
               "%s\r\n", host, strlen(dat), dat);
    puts(postDat);
    send(sock, postDat, strlen(postDat)+1, 0);

}