Add config option to disable neon compression
From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-11-18 00:54:02 CET
This patch allows the user to add:
[miscellany]
and Subversion will not send 'Accept-Encoding: gzip' to the server
Works for me in both cases...
Please yell at me (literally in the case of those here at the
* subversion/libsvn_ra_dav/fetch.c (custom_get_request),
Index: subversion/libsvn_ra_dav/fetch.c
#include "ra_dav.h"
@@ -444,12 +445,25 @@
+ SVN_ERR( svn_config_read_config(&cfg, pool) );
/* add in a reader to capture the body of the response. */
/* complete initialization of the body reading context */
- decompress_rv = ne_decompress_destroy(decompress);
/* we no longer need this */
#include "ra_dav.h"
@@ -216,10 +217,23 @@
+ SVN_ERR( svn_config_read_config(&cfg, pool) );
@@ -243,27 +257,51 @@
/* Register the "main" accepter and body-reader with the request --
/* Register the "error" accepter and body-reader with the request
--
the one to use when HTTP status is *not* 2XX */
- decompress_err = ne_decompress_reader(req, ra_dav_error_accepter,
- ne_xml_parse_v,
error_parser);
+ if (decompress_on)
+ {
+ decompress_err = ne_decompress_reader(req,
ra_dav_error_accepter,
+ ne_xml_parse_v,
error_parser);
+ }
+ else
+ {
+ decompress_err = NULL;
+ ne_add_response_body_reader(req, ra_dav_error_accepter,
ne_xml_parse_v,
+ error_parser);
+ }
/* run the request and get the resulting status code. */
rv = ne_request_dispatch(req);
- decompress_rv = ne_decompress_destroy(decompress_main);
- if (decompress_rv != 0)
+ if (decompress_main)
{
- rv = decompress_rv;
+ decompress_rv = ne_decompress_destroy(decompress_main);
+ if (decompress_rv != 0)
+ {
+ rv = decompress_rv;
+ }
}
- decompress_rv = ne_decompress_destroy(decompress_err);
- if (decompress_rv != 0)
+ if (decompress_err)
{
- rv = decompress_rv;
+ decompress_rv = ne_decompress_destroy(decompress_err);
+ if (decompress_rv != 0)
+ {
+ rv = decompress_rv;
+ }
}
code = ne_get_status(req)->code;
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.