From: Zdeněk Šustr Date: Thu, 2 Aug 2012 09:24:07 +0000 (+0000) Subject: Content-Type: text/plain headers for plain text output X-Git-Tag: glite-lb-server_R_2_4_3_1~7 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=133ae12e4e800e171785bc75b4ae946decdf6cf3;p=jra1mw.git Content-Type: text/plain headers for plain text output --- 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)