You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/04/15 06:00:58 UTC
svn commit: r1673633 - in /subversion/branches/1.9.x: ./ STATUS
subversion/libsvn_ra_serf/util.c subversion/tests/cmdline/commit_tests.py
Author: svn-role
Date: Wed Apr 15 04:00:58 2015
New Revision: 1673633
URL: http://svn.apache.org/r1673633
Log:
Merge the r1672372 group from trunk:
* r1672372, r1672404
Stop parsing the result of a succeeded PUT as xml error chain
Justification:
Reported as breaking compatibility with Sourceforge's setup.
Reported as release blocker in the 'error committing to 1.7 servers'
thread on dev@s.a.o.
Notes:
Apache Httpd 2.4 appears to return a proper xml result and as such
doesn't generate an error. I'm guessing you need an older httpd or
a special setup to reproduce the problem.
Votes:
+1: rhuijben, steveking, philip
Modified:
subversion/branches/1.9.x/ (props changed)
subversion/branches/1.9.x/STATUS
subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c
subversion/branches/1.9.x/subversion/tests/cmdline/commit_tests.py
Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 15 04:00:58 2015
@@ -89,4 +89,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665318,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667101,1667106-1667107,1667235,1667941,1667976,1668598,1668600,1668602-1668603,1668618,1669749,1670139,1670149,1670152,1670329,1670347,1670353,1671388,1672311,1672511-1672512,1672728
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665318,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667101,1667106-1667107,1667235,1667941,1667976,1668598,1668600,1668602-1668603,1668618,1669749,1670139,1670149,1670152,1670329,1670347,1670353,1671388,1672311,1672372,1672404,1672511-1672512,1672728
Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1673633&r1=1673632&r2=1673633&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Wed Apr 15 04:00:58 2015
@@ -235,19 +235,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1672372, r1672404
- Stop parsing the result of a succeeded PUT as xml error chain
- Justification:
- Reported as breaking compatibility with Sourceforge's setup.
- Reported as release blocker in the 'error committing to 1.7 servers'
- thread on dev@s.a.o.
- Notes:
- Apache Httpd 2.4 appears to return a proper xml result and as such
- doesn't generate an error. I'm guessing you need an older httpd or
- a special setup to reproduce the problem.
- Votes:
- +1: rhuijben, steveking, philip
-
* r1668599, r1668608
Fixes to the public svn_io API declarations and documentation.
Justification:
Modified: subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c?rev=1673633&r1=1673632&r2=1673633&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c Wed Apr 15 04:00:58 2015
@@ -1082,7 +1082,9 @@ svn_ra_serf__expect_empty_body(serf_requ
hdrs = serf_bucket_response_get_headers(response);
val = serf_bucket_headers_get(hdrs, "Content-Type");
- if (val && strncasecmp(val, "text/xml", sizeof("text/xml") - 1) == 0)
+ if (val
+ && (handler->sline.code < 200 || handler->sline.code >= 300)
+ && strncasecmp(val, "text/xml", sizeof("text/xml") - 1) == 0)
{
svn_ra_serf__server_error_t *server_err;
@@ -1095,7 +1097,7 @@ svn_ra_serf__expect_empty_body(serf_requ
}
else
{
- /* The body was not text/xml, so we don't know what to do with it.
+ /* The body was not text/xml, or we got a success code.
Toss anything that arrives. */
handler->discard_body = TRUE;
}
Modified: subversion/branches/1.9.x/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/cmdline/commit_tests.py?rev=1673633&r1=1673632&r2=1673633&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/1.9.x/subversion/tests/cmdline/commit_tests.py Wed Apr 15 04:00:58 2015
@@ -3087,6 +3087,32 @@ def mkdir_conflict_proper_error(sbox):
'mkdir', repo_url + '/A',
'-m', '')
+def commit_xml(sbox):
+ "commit an xml file"
+
+ sbox.build()
+
+ sbox.simple_add_text('index.xml', 'index.xml')
+ sbox.simple_add_text('index.html', 'index.html')
+ sbox.simple_propset('svn:mime-type', 'text/xml', 'index.xml')
+ sbox.simple_propset('svn:mime-type', 'text/html', 'index.html')
+
+ # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 201 Created'
+ # result with content type text/xml (copied from file), which used to
+ # invoke the error parsing.
+ #
+ # Depending on the Apache version and config, this may cause an xml error.
+ sbox.simple_commit()
+
+ # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 204 Updated'
+ # result with content type text/xml (copied from file), which used to
+ # invoke the error parsing.
+ #
+ # Depending on the Apache version and config, this may cause an xml error.
+ sbox.simple_append('index.xml', '<Q></R>', True)
+ sbox.simple_append('index.html', '<Q></R>', True)
+ sbox.simple_commit()
+
########################################################################
# Run the tests
@@ -3163,6 +3189,7 @@ test_list = [ None,
commit_deep_deleted,
commit_mergeinfo_ood,
mkdir_conflict_proper_error,
+ commit_xml,
]
if __name__ == '__main__':