Commit 5a8ec687 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

SES_RxInit() shouldnt know about the max length of HTTP headers.

parent 64ae2adc
......@@ -963,8 +963,7 @@ enum htc_status_e {
HTC_S_IDLE = 3,
};
void SES_RxInit(struct http_conn *htc, struct ws *ws,
unsigned maxbytes, unsigned maxhdr);
void SES_RxInit(struct http_conn *htc, struct ws *ws, unsigned maxbytes);
void SES_RxReInit(struct http_conn *htc);
enum htc_status_e SES_RxStuff(struct http_conn *, htc_complete_f *,
double *t1, double *t2, double ti, double tn);
......
......@@ -376,8 +376,7 @@ vca_make_session(struct worker *wrk, void *arg)
req = Req_New(wrk, sp);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
req->htc->fd = sp->fd;
SES_RxInit(req->htc, req->ws,
cache_param->http_req_size, cache_param->http_req_hdr_len);
SES_RxInit(req->htc, req->ws, cache_param->http_req_size);
SES_SetTransport(wrk, sp, req, wa->acceptlsock->transport);
}
......
......@@ -183,14 +183,12 @@ SES_Get_String_Attr(const struct sess *sp, enum sess_attr a)
/*--------------------------------------------------------------------*/
void
SES_RxInit(struct http_conn *htc, struct ws *ws, unsigned maxbytes,
unsigned maxhdr)
SES_RxInit(struct http_conn *htc, struct ws *ws, unsigned maxbytes)
{
htc->magic = HTTP_CONN_MAGIC;
htc->ws = ws;
htc->maxbytes = maxbytes;
htc->maxhdr = maxhdr;
(void)WS_Reserve(htc->ws, htc->maxbytes);
htc->rxbuf_b = ws->f;
......
......@@ -149,8 +149,7 @@ V1F_FetchRespHdr(struct busyobj *bo)
/* Receive response */
SES_RxInit(htc, bo->ws, cache_param->http_resp_size,
cache_param->http_resp_hdr_len);
SES_RxInit(htc, bo->ws, cache_param->http_resp_size);
CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
CHECK_OBJ_NOTNULL(bo->htc, HTTP_CONN_MAGIC);
......
......@@ -130,8 +130,7 @@ http1_unwait(struct worker *wrk, void *arg)
req = Req_New(wrk, sp);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
req->htc->fd = sp->fd;
SES_RxInit(req->htc, req->ws,
cache_param->http_req_size, cache_param->http_req_hdr_len);
SES_RxInit(req->htc, req->ws, cache_param->http_req_size);
http1_setstate(sp, H1NEWREQ);
wrk->task.func = http1_req;
wrk->task.priv = req;
......
......@@ -349,6 +349,7 @@ HTTP1_DissectRequest(struct http_conn *htc, struct http *hp)
CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC);
htc->maxhdr = cache_param->http_req_hdr_len;
retval = http1_splitline(hp, htc, HTTP1_Req);
if (retval != 0)
return (retval);
......@@ -414,6 +415,7 @@ HTTP1_DissectResponse(struct http_conn *htc, struct http *hp,
CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC);
CHECK_OBJ_NOTNULL(req, HTTP_MAGIC);
htc->maxhdr = cache_param->http_resp_hdr_len;
if (http1_splitline(hp, htc, HTTP1_Resp))
retval = 503;
......
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