Subversion Repositories SvarDOS

Rev

Rev 339 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 339 Rev 341
Line 6... Line 6...
6
 */
6
 */
7
 
7
 
8
#ifndef UNCHUNK_H
8
#ifndef UNCHUNK_H
9
#define UNCHUNK_H
9
#define UNCHUNK_H
10
 
10
 
-
 
11
struct unchunk_state {
-
 
12
  char partial_hdr[16];  /* a small buffer for storing partial chunk headers, if these are transmitted in separate parts */
-
 
13
  long bytesleft;        /* how many bytes are expected yet in the ongoing chunk */
-
 
14
};
-
 
15
 
11
/* transforms a http CHUNKED stream into actual data, returns the amount of raw data to read */
16
/* transforms a http CHUNKED stream into actual data, returns the amount of
-
 
17
 * raw data to read or -1 on error. st MUST be zeroed before first call. */
12
int unchunk(unsigned char *buff, int bufflen);
18
int unchunk(unsigned char *buff, int bufflen, struct unchunk_state *st);
13
 
19
 
14
#endif
20
#endif