Commit acbef39c authored by Ed "oddsock" Zaleski's avatar Ed "oddsock" Zaleski

a few fixes from karl...

svn path=/icecast/trunk/icecast/; revision=8201
parent 726e8fc0
......@@ -432,20 +432,25 @@ int fserve_client_create(client_t *httpclient, char *path)
time_t now;
int strflen;
time(&now);
struct tm result;
int64_t endpos = rangenumber+new_content_len-1;
if (endpos < 0) {
endpos = 0;
}
strflen = strftime(currenttime, 50, "%a, %d-%b-%Y %X GMT",
gmtime(&now));
gmtime_r(&now, &result));
httpclient->respcode = 206;
bytes = sock_write(httpclient->con->sock,
"HTTP/1.1 206 Partial Content\r\n"
"Date: %s\r\n"
"Content-Length: %ld\r\n"
"Content-Length: " FORMAT_INT64 "\r\n"
"Content-Range: bytes " FORMAT_INT64 \
"-" FORMAT_INT64 "/" FORMAT_INT64 "\r\n"
"Content-Type: %s\r\n\r\n",
currenttime,
new_content_len,
rangenumber,
client->content_length-1,
endpos,
client->content_length,
fserve_content_type(path));
if(bytes > 0) httpclient->con->sent_bytes = bytes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment