MCPcopy Create free account
hub / github.com/apache/httpd / is_idempotent

Function is_idempotent

modules/proxy/mod_proxy_ajp.c:119–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117#define METHOD_IDEMPOTENT_WITH_ARGS 2
118
119static int is_idempotent(request_rec *r)
120{
121 /*
122 * RFC2616 (9.1.2): GET, HEAD, PUT, DELETE, OPTIONS, TRACE are considered
123 * idempotent. Hint: HEAD requests use M_GET as method number as well.
124 */
125 switch (r->method_number) {
126 case M_GET:
127 case M_DELETE:
128 case M_PUT:
129 case M_OPTIONS:
130 case M_TRACE:
131 /*
132 * If the request has arguments it might have side-effects and thus
133 * it might be undesirable to resend it to a backend again
134 * automatically.
135 */
136 if (r->args) {
137 return METHOD_IDEMPOTENT_WITH_ARGS;
138 }
139 return METHOD_IDEMPOTENT;
140 /* Everything else is not considered idempotent. */
141 default:
142 return METHOD_NON_IDEMPOTENT;
143 }
144}
145
146static apr_off_t get_content_length(request_rec * r)
147{

Callers 1

ap_proxy_ajp_requestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected