You need TWO \r\n pairs at the end of the request:

sprintf(request, "GET %s HTTP/1.0\r\nHOST:%s \r\n\r\n", argv[1] + (tok - argv[1]), host);

It's hanging because the server is waiting for the...