"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/http_act.c" between
haproxy-1.9.3.tar.gz and haproxy-1.9.4.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.

http_act.c  (haproxy-1.9.3):http_act.c  (haproxy-1.9.4)
skipping to change at line 37 skipping to change at line 37
#include <common/version.h> #include <common/version.h>
#include <types/capture.h> #include <types/capture.h>
#include <types/global.h> #include <types/global.h>
#include <proto/acl.h> #include <proto/acl.h>
#include <proto/arg.h> #include <proto/arg.h>
#include <proto/http_rules.h> #include <proto/http_rules.h>
#include <proto/log.h> #include <proto/log.h>
#include <proto/proto_http.h> #include <proto/proto_http.h>
#include <proto/stream_interface.h>
/* This function executes one of the set-{method,path,query,uri} actions. It /* This function executes one of the set-{method,path,query,uri} actions. It
* builds a string in the trash from the specified format string. It finds * builds a string in the trash from the specified format string. It finds
* the action to be performed in <http.action>, previously filled by function * the action to be performed in <http.action>, previously filled by function
* parse_set_req_line(). The replacement action is excuted by the function * parse_set_req_line(). The replacement action is excuted by the function
* http_action_set_req_line(). It always returns ACT_RET_CONT. If an error * http_action_set_req_line(). It always returns ACT_RET_CONT. If an error
* occurs the action is canceled, but the rule processing continue. * occurs the action is canceled, but the rule processing continue.
*/ */
static enum act_return http_action_set_req_line(struct act_rule *rule, struct pr oxy *px, static enum act_return http_action_set_req_line(struct act_rule *rule, struct pr oxy *px,
struct session *sess, struct str eam *s, int flags) struct session *sess, struct str eam *s, int flags)
skipping to change at line 187 skipping to change at line 188
/* This function executes the "reject" HTTP action. It clears the request and /* This function executes the "reject" HTTP action. It clears the request and
* response buffer without sending any response. It can be useful as an HTTP * response buffer without sending any response. It can be useful as an HTTP
* alternative to the silent-drop action to defend against DoS attacks, and may * alternative to the silent-drop action to defend against DoS attacks, and may
* also be used with HTTP/2 to close a connection instead of just a stream. * also be used with HTTP/2 to close a connection instead of just a stream.
* The txn status is unchanged, indicating no response was sent. The termination * The txn status is unchanged, indicating no response was sent. The termination
* flags will indicate "PR". It always returns ACT_RET_STOP. * flags will indicate "PR". It always returns ACT_RET_STOP.
*/ */
static enum act_return http_action_reject(struct act_rule *rule, struct proxy *p x, static enum act_return http_action_reject(struct act_rule *rule, struct proxy *p x,
struct session *sess, struct stream *s , int flags) struct session *sess, struct stream *s , int flags)
{ {
si_must_kill_conn(chn_prod(&s->req));
channel_abort(&s->req); channel_abort(&s->req);
channel_abort(&s->res); channel_abort(&s->res);
s->req.analysers = 0; s->req.analysers = 0;
s->res.analysers = 0; s->res.analysers = 0;
HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1); HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1);
HA_ATOMIC_ADD(&sess->fe->fe_counters.denied_req, 1); HA_ATOMIC_ADD(&sess->fe->fe_counters.denied_req, 1);
if (sess->listener && sess->listener->counters) if (sess->listener && sess->listener->counters)
HA_ATOMIC_ADD(&sess->listener->counters->denied_req, 1); HA_ATOMIC_ADD(&sess->listener->counters->denied_req, 1);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)