* msg->next = first non-visited byte
*/
+ next_one:
/* There's a protected area at the end of the buffer for rewriting
* purposes. We don't want to start to parse the request if the
* protected area is affected, because we may have to move processed
*/
switch (txn->status) {
+ case 100:
+ /*
+ * We may be facing a 100-continue response, in which case this
+ * is not the right response, and we're waiting for the next one.
+ * Let's allow this response to go to the client and wait for the
+ * next one.
+ */
+ hdr_idx_init(&txn->hdr_idx);
+ msg->next -= channel_forward(rep, msg->next);
+ msg->msg_state = HTTP_MSG_RPBEFORE;
+ txn->status = 0;
+ s->logs.t_data = -1; /* was not a response yet */
+ goto next_one;
+
case 200:
case 203:
case 206:
cur_proxy = t->fe;
}
- /*
- * We may be facing a 100-continue response, in which case this
- * is not the right response, and we're waiting for the next one.
- * Let's allow this response to go to the client and wait for the
- * next one.
- */
- if (unlikely(txn->status == 100)) {
- hdr_idx_init(&txn->hdr_idx);
- msg->next -= channel_forward(rep, msg->next);
- msg->msg_state = HTTP_MSG_RPBEFORE;
- txn->status = 0;
- t->logs.t_data = -1; /* was not a response yet */
- rep->analysers |= AN_RES_WAIT_HTTP | an_bit;
- rep->flags |= CF_WAKE_WRITE;
- return 1;
- }
- else if (unlikely(txn->status < 200))
+ if (unlikely(txn->status < 200))
goto skip_header_mangling;
/* we don't have any 1xx status code now */