[mapserver-commits] r12396 - in trunk/mapserver/mapcache: include
src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:22:09 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:22:09 -0700 (Fri, 26 Aug 2011)
New Revision: 12396
Modified:
trunk/mapserver/mapcache/include/geocache.h
trunk/mapserver/mapcache/src/http.c
Log:
add logging back
thomas.bonfort | 2011-07-03 15:14:43 +0200 (Sun, 03 Jul 2011)
Modified: trunk/mapserver/mapcache/include/geocache.h
===================================================================
--- trunk/mapserver/mapcache/include/geocache.h 2011-08-26 11:22:05 UTC (rev 12395)
+++ trunk/mapserver/mapcache/include/geocache.h 2011-08-26 11:22:09 UTC (rev 12396)
@@ -268,6 +268,7 @@
};
geocache_http* geocache_http_configuration_parse(geocache_context *ctx,ezxml_t node);
+geocache_http* geocache_http_clone(geocache_context *ctx, geocache_http *orig);
struct geocache_http {
char *url; /**< the base url to request */
Modified: trunk/mapserver/mapcache/src/http.c
===================================================================
--- trunk/mapserver/mapcache/src/http.c 2011-08-26 11:22:05 UTC (rev 12395)
+++ trunk/mapserver/mapcache/src/http.c 2011-08-26 11:22:09 UTC (rev 12396)
@@ -122,11 +122,9 @@
void geocache_http_do_request_with_params(geocache_context *ctx, geocache_http *req, apr_table_t *params,
geocache_buffer *data, apr_table_t *headers) {
- char *fullUrl = geocache_http_build_url(ctx,req->url,params);
- char *oldurl = req->url;
- req->url = fullUrl;
- geocache_http_do_request(ctx,req,data,headers);
- req->url = oldurl;
+ geocache_http *request = geocache_http_clone(ctx,req);
+ request->url = geocache_http_build_url(ctx,req->url,params);
+ geocache_http_do_request(ctx,request,data,headers);
}
/* calculate the length of the string formed by key=value&, and add it to cnt */
@@ -302,6 +300,12 @@
/* TODO: parse <proxy> and <auth> elements */
}
+geocache_http* geocache_http_clone(geocache_context *ctx, geocache_http *orig) {
+ geocache_http *ret = apr_pcalloc(ctx->pool, sizeof(geocache_http*));
+ ret->headers = apr_table_clone(ctx->pool,orig->headers);
+ ret->url = apr_pstrdup(ctx->pool, orig->url);
+ return ret;
+}
/* vim: ai ts=3 sts=3 et sw=3
*/
More information about the mapserver-commits
mailing list