/[axel]/trunk/http.c
ViewVC logotype

Diff of /trunk/http.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by appaji-guest, Tue Jan 15 16:11:35 2008 UTC revision 25 by appaji-guest, Wed Jan 30 11:38:43 2008 UTC
# Line 109  void http_get( http_t *conn, char *lurl Line 109  void http_get( http_t *conn, char *lurl
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    
# Line 196  char *http_header( http_t *conn, char *h Line 196  char *http_header( http_t *conn, char *h
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    

Legend:
Removed from v.24  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.5