@@ -52,10 +52,10 @@ static size_t ngx_http_cache_purge_content_type_html_size = sizeof(ngx_http_cach
5252static size_t ngx_http_cache_purge_content_type_xml_size = sizeof (ngx_http_cache_purge_content_type_xml );
5353static size_t ngx_http_cache_purge_content_type_text_size = sizeof (ngx_http_cache_purge_content_type_text );
5454
55- static const char ngx_http_cache_purge_body_templ_json [] = "{\"Key\": \"%s\",\"Path\": \"%s\" }" ;
56- static const char ngx_http_cache_purge_body_templ_html [] = "<html><head><title>Successful purge</title></head><body bgcolor=\"white\"><center><h1>Successful purge</h1><br>Key : %s<br>Path : %s< /center></body></html>" ;
57- static const char ngx_http_cache_purge_body_templ_xml [] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><status><Key><![CDATA[%s]]></Key><Path><![CDATA[%s]]></Path>< /status>" ;
58- static const char ngx_http_cache_purge_body_templ_text [] = "Key:%s\nPath:%s\ n" ;
55+ static const char ngx_http_cache_purge_body_templ_json [] = "{\"Key\": \"%s\"}" ;
56+ static const char ngx_http_cache_purge_body_templ_html [] = "<html><head><title>Successful purge</title></head><body bgcolor=\"white\"><center><h1>Successful purge</h1><br>Key : %s</center></body></html>" ;
57+ static const char ngx_http_cache_purge_body_templ_xml [] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><status><Key><![CDATA[%s]]></Key></status>" ;
58+ static const char ngx_http_cache_purge_body_templ_text [] = "Key:%s\n" ;
5959
6060static size_t ngx_http_cache_purge_body_templ_json_size = sizeof (ngx_http_cache_purge_body_templ_json );
6161static size_t ngx_http_cache_purge_body_templ_html_size = sizeof (ngx_http_cache_purge_body_templ_html );
@@ -1538,7 +1538,9 @@ ngx_http_cache_purge_send_response(ngx_http_request_t *r) {
15381538 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
15391539 }
15401540
1541- p = ngx_snprintf (buf , resp_tmpl_len , resp_body , buf_keydata , r -> cache -> file .name .data );
1541+
1542+ //p = ngx_snprintf(buf, resp_tmpl_len, resp_body , buf_keydata, r->cache->file.name.data);
1543+ p = ngx_snprintf (buf , resp_tmpl_len , resp_body , buf_keydata , buf_keydata );
15421544 if (p == NULL ) {
15431545 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
15441546 }
@@ -1572,7 +1574,6 @@ ngx_http_cache_purge_send_response(ngx_http_request_t *r) {
15721574 return rc ;
15731575 }
15741576
1575-
15761577 return ngx_http_output_filter (r , & out );
15771578}
15781579
0 commit comments