From 133ae12e4e800e171785bc75b4ae946decdf6cf3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Thu, 2 Aug 2012 09:24:07 +0000 Subject: [PATCH] Content-Type: text/plain headers for plain text output --- org.glite.lb.server/src/lb_proto.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/org.glite.lb.server/src/lb_proto.c b/org.glite.lb.server/src/lb_proto.c index 3c63140..c89f628 100644 --- a/org.glite.lb.server/src/lb_proto.c +++ b/org.glite.lb.server/src/lb_proto.c @@ -88,6 +88,13 @@ static const char* const response_headers_html[] = { NULL }; +static const char* const response_headers_plain[] = { + "Cache-Control: no-cache", + "Server: edg_wll_Server/" PROTO_VERSION "/" COMP_PROTO, + "Content-Type: text/plain", + NULL +}; + volatile sig_atomic_t purge_quit = 0; @@ -1431,7 +1438,7 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx, } else ret = HTTP_NOTALLOWED; err: asprintf(response,"HTTP/1.1 %d %s",ret,edg_wll_HTTPErrorMessage(ret)); - *headersOut = (char **) (html ? response_headers_html : response_headers_dglb); + *headersOut = (char **) (html ? (text ? response_headers_plain : response_headers_html) : response_headers_dglb); if ((ret != HTTP_OK && ret != HTTP_ACCEPTED) && text) *bodyOut = edg_wll_ErrorToText(ctx,ret); else if ((ret != HTTP_OK && ret != HTTP_ACCEPTED) && html) -- 1.8.2.3