deleted QSE_HTTPD_SERVERSTD_EXPECT100 and improved 'Expect:' handling to return '417 Expectation Failed' for unknown expecttion

This commit is contained in:
2013-03-22 14:48:57 +00:00
parent d5603febaa
commit 433b0da96d
7 changed files with 27 additions and 34 deletions

View File

@ -574,11 +574,17 @@ static int capture_expect (qse_htrd_t* htrd, qse_htb_pair_t* pair)
{
qse_htre_hdrval_t* val;
val = QSE_HTB_VPTR(pair);
while (val->next) val = val->next;
/* Expect is included */
htrd->re.attr.flags |= QSE_HTRE_ATTR_EXPECT;
if (qse_mbscmp (val->ptr, QSE_MT("100-continue")) == 0)
htrd->re.attr.flags |= QSE_HTRE_ATTR_EXPECT100;
val = QSE_HTB_VPTR(pair);
while (val)
{
/* Expect: 100-continue is included */
if (qse_mbscasecmp (val->ptr, QSE_MT("100-continue")) == 0)
htrd->re.attr.flags |= QSE_HTRE_ATTR_EXPECT100;
val = val->next;
}
return 0;
}