| 109 |
if( conn->firstbyte ) |
if( conn->firstbyte ) |
| 110 |
{ |
{ |
| 111 |
if( conn->lastbyte ) |
if( conn->lastbyte ) |
| 112 |
http_addheader( conn, "Range: bytes=%i-%i", conn->firstbyte, conn->lastbyte ); |
http_addheader( conn, "Range: bytes=%lld-%lld", conn->firstbyte, conn->lastbyte ); |
| 113 |
else |
else |
| 114 |
http_addheader( conn, "Range: bytes=%i-", conn->firstbyte ); |
http_addheader( conn, "Range: bytes=%lld-", conn->firstbyte ); |
| 115 |
} |
} |
| 116 |
} |
} |
| 117 |
|
|
| 196 |
return( NULL ); |
return( NULL ); |
| 197 |
} |
} |
| 198 |
|
|
| 199 |
int http_size( http_t *conn ) |
long long int http_size( http_t *conn ) |
| 200 |
{ |
{ |
| 201 |
char *i; |
char *i; |
| 202 |
int j; |
long long int j; |
| 203 |
|
|
| 204 |
if( ( i = http_header( conn, "Content-Length:" ) ) == NULL ) |
if( ( i = http_header( conn, "Content-Length:" ) ) == NULL ) |
| 205 |
return( -2 ); |
return( -2 ); |
| 206 |
|
|
| 207 |
sscanf( i, "%i", &j ); |
sscanf( i, "%lld", &j ); |
| 208 |
return( j ); |
return( j ); |
| 209 |
} |
} |
| 210 |
|
|