Skip to content

Commit

Permalink
Add more debugging messages to make it clearer what body type is used
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 26, 2014
1 parent 5f21c6c commit f4237e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/rlm_rest/rest.c
Expand Up @@ -1971,6 +1971,7 @@ int rest_request_config(rlm_rest_t *instance, rlm_rest_section_t *section,
switch (method) {
case HTTP_METHOD_GET :
case HTTP_METHOD_DELETE :
RDEBUG3("Using a HTTP method which does not require a body. Forcing request body type to \"none\"");
return 0;

case HTTP_METHOD_POST :
Expand All @@ -1986,6 +1987,8 @@ int rest_request_config(rlm_rest_t *instance, rlm_rest_section_t *section,
if (!ctx->headers) goto error_header;
}

RDEBUG3("Request body content-type will be \"%s\"",
fr_int2str(http_content_type_table, type, section->body_str));
switch (type) {
case HTTP_BODY_NONE:
if (rest_request_config_body(instance, section, request, handle,
Expand Down Expand Up @@ -2092,7 +2095,7 @@ int rest_response_decode(rlm_rest_t *instance, UNUSED rlm_rest_section_t *sectio
return ret;
}

RDEBUG3("Processing body");
RDEBUG3("Processing response body");

switch (ctx->response.type) {
case HTTP_BODY_NONE:
Expand Down

0 comments on commit f4237e4

Please sign in to comment.