@@ -52,10 +52,10 @@ static size_t ngx_http_cache_purge_content_type_html_size = sizeof(ngx_http_cach
52
52
static size_t ngx_http_cache_purge_content_type_xml_size = sizeof (ngx_http_cache_purge_content_type_xml );
53
53
static size_t ngx_http_cache_purge_content_type_text_size = sizeof (ngx_http_cache_purge_content_type_text );
54
54
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" ;
59
59
60
60
static size_t ngx_http_cache_purge_body_templ_json_size = sizeof (ngx_http_cache_purge_body_templ_json );
61
61
static 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) {
1538
1538
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
1539
1539
}
1540
1540
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 );
1542
1544
if (p == NULL ) {
1543
1545
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
1544
1546
}
@@ -1572,7 +1574,6 @@ ngx_http_cache_purge_send_response(ngx_http_request_t *r) {
1572
1574
return rc ;
1573
1575
}
1574
1576
1575
-
1576
1577
return ngx_http_output_filter (r , & out );
1577
1578
}
1578
1579
0 commit comments