Improved the GET protocol for the http socket. By adding Connection: close

the server sends a EOF immediately after the data, improving performance
because readers are not left waiting for EOF.
This commit is contained in:
Don BURNS
2006-03-07 18:26:32 +00:00
parent c448e4d791
commit 582967286a

View File

@@ -272,7 +272,14 @@ class NetReader : public osgDB::ReaderWriter
return ReadResult::FILE_NOT_FOUND;
}
*sio << "GET /" << fileName << " HTTP/1.1\n" << "Host: " << hostname << "\n\n";
*sio <<
"GET /" << fileName << " HTTP/1.1\n"
"User-Agent: OSGNetPlugin/1.0\n"
"Accept: */*\n"
"Host: " << hostname << "\n"
"Connection: close\n"
"\n";
sio->flush();
char linebuff[256];