Commit 48ce70af authored by Pekka Pessi's avatar Pekka Pessi

Updated Content-Encoding (e) header parsing.

darcs-hash:20051129143239-65a35-e0ef6125eae9b03bdb11bd271599ced00f4c7fe6.gz
parent 8f314cbe
......@@ -149,7 +149,7 @@ typedef struct sip_cseq_s sip_cseq_t;
typedef sip_generic_t sip_etag_t;
typedef sip_generic_t sip_if_match_t;
typedef msg_content_disposition_t sip_content_disposition_t;
typedef sip_generic_t sip_content_encoding_t;
typedef msg_list_t sip_content_encoding_t;
typedef msg_list_t sip_content_language_t;
typedef struct sip_content_length_s sip_content_length_t;
typedef struct msg_content_type_s sip_content_type_t;
......
......@@ -459,7 +459,7 @@ static void sip_content_disposition_update(sip_content_disposition_t *cd)
/**@SIP_HEADER sip_content_encoding Content-Encoding Header
*
* The Content-Encoding header indicates what additional content codings
* have been applied to the entity-body. Its syntax is defined in [S10.16]
* have been applied to the entity-body. Its syntax is defined in [S20.12]
* as follows:
*
* @code
......@@ -487,16 +487,16 @@ static void sip_content_disposition_update(sip_content_disposition_t *cd)
*/
msg_hclass_t sip_content_encoding_class[] =
SIP_HEADER_CLASS_G(content_encoding, "Content-Encoding", "e", append);
SIP_HEADER_CLASS_LIST(content_encoding, "Content-Encoding", "e", list);
int sip_content_encoding_d(su_home_t *home, sip_header_t *h, char *s, int slen)
{
return sip_generic_d(home, h, s, slen);
return msg_list_d(home, h, s, slen);
}
int sip_content_encoding_e(char b[], int bsiz, sip_header_t const *h, int f)
{
return sip_generic_e(b, bsiz, h, f);
return msg_list_e(b, bsiz, h, f);
}
/* ====================================================================== */
......
......@@ -662,7 +662,7 @@ static int test_encoding(void)
"Security-Verify: tls;q=0.2\r\n"
"Privacy: none\r\n"
"Content-Length: 7\r\n"
"Content-Encoding: identity\r\n"
"Content-Encoding: gzip, deflate, identity\r\n"
"Content-Disposition: filter\r\n"
"Content-Language: fi\r\n"
"MIME-Version: 1.0\r\n"
......@@ -1350,7 +1350,7 @@ static int parser_test(void)
offsetof(sip_accept_language_t, aa_params));
TEST(sip_session_expires_class->hc_params, offsetof(sip_session_expires_t, x_params));
//TEST(sip_min_se_class->hc_params, offsetof(sip_min_se_t, x_params));
TEST(sip_min_se_class->hc_params, offsetof(sip_min_se_t, min_params));
TEST(sip_allow_class->hc_params, offsetof(sip_allow_t, k_items));
TEST(sip_require_class->hc_params, offsetof(sip_require_t, k_items));
......@@ -1385,7 +1385,8 @@ static int parser_test(void)
TEST(sip_mime_version_class->hc_params, 0);
TEST(sip_content_type_class->hc_params,
offsetof(sip_content_type_t, c_params));
TEST(sip_content_encoding_class->hc_params, 0);
TEST(sip_content_encoding_class->hc_params,
offsetof(sip_content_encoding_t, k_items));
TEST(sip_content_disposition_class->hc_params,
offsetof(sip_content_disposition_t, cd_params));
TEST(sip_content_length_class->hc_params, 0);
......
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