Project

General

Profile

lighttpd-1.4-expectation-failed.diff

peto, 2009-02-01 01:21

View differences:

src/request.c (working copy)
878 878
									}
879 879
									return 0;
880 880
								}
881
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Expect")))) {
882
								/* HTTP 2616 8.2.3
883
								 * Expect: 100-continue
884
								 *
885
								 *   -> (10.1.1)  100 (read content, process request, send final status-code)
886
								 *   -> (10.4.18) 417 (close)
887
								 *
888
								 * (not handled at all yet, we always send 417 here)
889
								 *
890
								 * What has to be added ?
891
								 * 1. handling of chunked request body
892
								 * 2. out-of-order sending from the HTTP/1.1 100 Continue
893
								 *    header
894
								 *
895
								 */
896

  
897
								con->http_status = 417;
898
								con->keep_alive = 0;
899

  
900
								array_insert_unique(con->request.headers, (data_unset *)ds);
901
								return 0;
902 881
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Host")))) {
903 882
								if (!con->request.http_host) {
904 883
									con->request.http_host = ds->value;