I am trying to submit an exe to a online virus scanner but keeps saying bad request , i am a n00b at this packet sending so if anyone has experience your welcome to help

Code:
#include <windows.h>
#include <winsock.h>
#include <stdio.h>
#pragma comment( lib, "ws2_32.lib" ) 


char* ReadLog(const char * Filename)//Wrote this to Read Text file to char* -->there are many other ways to do this
{
	HANDLE hFile =CreateFile(Filename,GENERIC_READ,NULL,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
	if(hFile != INVALID_HANDLE_VALUE)
	{
		printf("%s\n","Valid Handle To File\n");
	}
    DWORD num_to_read = (DWORD)GetFileSize(hFile,NULL);
    DWORD num_read = -1;
	char *buffer = new char[num_to_read];
    //byte *bytes = new byte[num_to_read];
	//char *buffer = (char*)bytes;
	if(!ReadFile(hFile,buffer,num_to_read,&num_read,NULL)){return NULL;};
	CloseHandle(hFile);
	//buffer=(char*)bytes;
	return (char*)buffer; 
}

void HTTP_UPLOAD_REQUEST(char * Server,int Port,char * uploadscript,char* boundary,char*filetoup,char* data)
{
//Create Socket for sending data
WSADATA wsaData;
WSAStartup( MAKEWORD( 1,1 ), &wsaData );
SOCKET Socket = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
LPHOSTENT hostEntry;
hostEntry = gethostbyname( Server );//Get ip from Server by hostname
sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_addr = *((LPIN_ADDR)*hostEntry->h_addr_list);
addr.sin_port = htons( Port ); //Set Port
if(connect( Socket, (LPSOCKADDR) &addr, sizeof(struct sockaddr) ) != SOCKET_ERROR)
{
	printf("Connected\n");
}
else
{
	printf("Not Connected\n");
}
//Socket created and connected to Server!

//Create HTTP POST Request
	//construct POST Header
	char header[512]="";
	sprintf( header, "POST %s HTTP/1.0\r\nContent-Type: application/octet-stream; boundary=%s\r\nContent-Length: %u\r\n\r\n",uploadscript, boundary,2*strlen(data));
	
	//construct Body(data part) of HTTP POST
	char* body=new char[strlen(data)+4000];
	sprintf( body, "--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\n\r\n %s\r\n--%s\r\n",boundary,"upfile",filetoup,data,boundary);

    //Put Header and Body  together into Request
	char * Request=new char[strlen(header)+strlen(body)+strlen(data)];
	sprintf( Request, "%s%s", header,body );
    
	printf("%s %s\n","Request",Request);
	//int bytestosend = strlen(Request);
    int bytessend =send( Socket, Request, strlen(Request), 0 );
	
	printf("%s %d\n","Bytes Sent = ",bytessend);
	
	char RecvBuffer[1024];
	int bytesrecv = recv(Socket,RecvBuffer,sizeof(RecvBuffer),0);

	printf("%s %d\n","Bytes Recieved = ",bytesrecv);

	printf("%s\n",RecvBuffer);

	closesocket(Socket);//cleanup --File isnt transmitted if not called!
    
}
int main(int argc, char* argv[])
{   
	
	char * buffer; //Buffer to Save data into
	buffer=ReadLog("C:\\test.exe");//use absolute path! //Reads File to char*
	HTTP_UPLOAD_REQUEST("scanner.novirusthanks.org",80,"","---------------------------281452328116827","test.exe",buffer);
    // useage: (Server,Port,(path and)uploadscript,bundary(u can use any string u like-> its just to seperate data block in HTTP POST from anything else),Filename an Server,data to send)
	return 1;
}
The actual packet looks like this in LiveHttpHeaders, a firefox addon that shows the packets sent to the web server with firefox.

Multi-Engine Antivirus Scanner - Services - NoVirusThanks.org

POST / HTTP/1.1
Host: scanner.novirusthanks.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: Multi-Engine Antivirus Scanner - Services - NoVirusThanks.org
Cookie: __utma=257451540.280863044.1267601445.1269835901.1 269838715.11; __utmz=257451540.1269838715.11.11.utmcsr=google|ut mccn=(organic)|utmcmd=organic|utmctr=novirusthanks ; __utmb=257451540.30.10.1269838715; __utmc=257451540
Content-Type: multipart/form-data; boundary=---------------------------24626113235537
Content-Length: 3085629
-----------------------------24626113235537
Content-Disposition: form-data; name="upfile"; filename="test.exe"
Content-Type: application/octet-stream

MZ
HTTP/1.1 302 Found
Date: Mon, 29 Mar 2010 05:33:42 GMT
Server: Apache
Location: Multi-Engine Antivirus Scanner - Services - NoVirusThanks.org
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html