- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathencoding_prefs.h
More file actions
Latest commit
24 lines (18 loc) · 558 Bytes
/
Copy pathencoding_prefs.h
File metadata and controls
24 lines (18 loc) · 558 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndefENCODING_PREFS_H
#defineENCODING_PREFS_H
//stores client encoding preferences
//default weight is 1 (RFC 7231 5.3.1)
//-1 if unspecified
typedefstruct {
intgzip;
intidentity;
intcatch_all; //weight of all other encodings not on list
} encoding_prefs_t;
//initialize
voidinit_encoding_prefs(encoding_prefs_t*ep);
//parses the Accept-Encoding header string
//returns -1 if malformed
intparse_accepted_encodings(encoding_prefs_t*result, char*header_str);
intparse_qvalue(constchar*qstr);
intparse_weight(constchar*wstr);
#endif