mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
[MINOR] http: remove the last call to stream_int_return
And remove the now unused function itself too.
This commit is contained in:
parent
b50943e717
commit
8e89b84848
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
include/proto/stream_interface.h
|
* include/proto/stream_interface.h
|
||||||
This file contains stream_interface function prototypes
|
* This file contains stream_interface function prototypes
|
||||||
|
*
|
||||||
Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
||||||
|
*
|
||||||
This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
License as published by the Free Software Foundation, version 2.1
|
* License as published by the Free Software Foundation, version 2.1
|
||||||
exclusively.
|
* exclusively.
|
||||||
|
*
|
||||||
This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PROTO_STREAM_INTERFACE_H
|
#ifndef _PROTO_STREAM_INTERFACE_H
|
||||||
#define _PROTO_STREAM_INTERFACE_H
|
#define _PROTO_STREAM_INTERFACE_H
|
||||||
@ -31,7 +31,6 @@
|
|||||||
/* main event functions used to move data between sockets and buffers */
|
/* main event functions used to move data between sockets and buffers */
|
||||||
int stream_int_check_timeouts(struct stream_interface *si);
|
int stream_int_check_timeouts(struct stream_interface *si);
|
||||||
void stream_int_report_error(struct stream_interface *si);
|
void stream_int_report_error(struct stream_interface *si);
|
||||||
void stream_int_return(struct stream_interface *si, const struct chunk *msg);
|
|
||||||
void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg);
|
void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg);
|
||||||
|
|
||||||
/* functions used when running a stream interface as a task */
|
/* functions used when running a stream interface as a task */
|
||||||
|
@ -3247,11 +3247,9 @@ int http_process_res_common(struct session *t, struct buffer *rep, int an_bit, s
|
|||||||
t->srv->counters.failed_resp++;
|
t->srv->counters.failed_resp++;
|
||||||
cur_proxy->counters.failed_resp++;
|
cur_proxy->counters.failed_resp++;
|
||||||
return_srv_prx_502:
|
return_srv_prx_502:
|
||||||
buffer_shutr_now(rep);
|
|
||||||
buffer_shutw_now(req);
|
|
||||||
rep->analysers = 0;
|
rep->analysers = 0;
|
||||||
txn->status = 502;
|
txn->status = 502;
|
||||||
stream_int_return(rep->cons, error_message(t, HTTP_ERR_502));
|
stream_int_retnclose(rep->cons, error_message(t, HTTP_ERR_502));
|
||||||
if (!(t->flags & SN_ERR_MASK))
|
if (!(t->flags & SN_ERR_MASK))
|
||||||
t->flags |= SN_ERR_PRXCOND;
|
t->flags |= SN_ERR_PRXCOND;
|
||||||
if (!(t->flags & SN_FINST_MASK))
|
if (!(t->flags & SN_FINST_MASK))
|
||||||
|
@ -59,19 +59,6 @@ void stream_int_report_error(struct stream_interface *si)
|
|||||||
si->ib->flags |= BF_READ_ERROR;
|
si->ib->flags |= BF_READ_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Erase any content from input and output buffers, and return a message into
|
|
||||||
* the output buffer. The message is provided as a "chunk". If it is null,
|
|
||||||
* then an empty message is used.
|
|
||||||
*/
|
|
||||||
void stream_int_return(struct stream_interface *si, const struct chunk *msg)
|
|
||||||
{
|
|
||||||
buffer_erase(si->ib);
|
|
||||||
buffer_cut_tail(si->ob);
|
|
||||||
if (msg && msg->len)
|
|
||||||
buffer_write(si->ob, msg->str, msg->len);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a message to the client ; the connection is shut down for read,
|
* Returns a message to the client ; the connection is shut down for read,
|
||||||
* and the request is cleared so that no server connection can be initiated.
|
* and the request is cleared so that no server connection can be initiated.
|
||||||
|
Loading…
Reference in New Issue
Block a user