summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2007-07-31 18:19:34 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2007-07-31 18:19:34 +0000
commit89bd94c0a9d4ba685b46629d2813a7314c4df47a (patch)
treebcd866bebdaeee1e81a0487db8d365a578e3c5db
parentba8ca39fda7071125765f05754845367d41264f4 (diff)
downloadneon-89bd94c0a9d4ba685b46629d2813a7314c4df47a.tar.gz
* src/ne_session.h (ne_session_flag): Add NE_SESSFLAG_RFC4918.
* src/ne_basic.c (copy_or_move): Use an abs_path in Destination header, rather than an absoluteURI, iff the 4918 flag is enabled. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1215 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r--src/ne_basic.c11
-rw-r--r--src/ne_session.h5
2 files changed, 13 insertions, 3 deletions
diff --git a/src/ne_basic.c b/src/ne_basic.c
index e3d5f0f..3e8144a 100644
--- a/src/ne_basic.c
+++ b/src/ne_basic.c
@@ -380,9 +380,14 @@ static int copy_or_move(ne_session *sess, int is_move, int overwrite,
ne_lock_using_parent(req, dest);
#endif
- ne_print_request_header(req, "Destination", "%s://%s%s",
- ne_get_scheme(sess),
- ne_get_server_hostport(sess), dest);
+ if (ne_get_session_flag(sess, NE_SESSFLAG_RFC4918)) {
+ ne_add_request_header(req, "Destination", dest);
+ }
+ else {
+ ne_print_request_header(req, "Destination", "%s://%s%s",
+ ne_get_scheme(sess),
+ ne_get_server_hostport(sess), dest);
+ }
ne_add_request_header(req, "Overwrite", overwrite?"T":"F");
diff --git a/src/ne_session.h b/src/ne_session.h
index 1c83361..aca1b1a 100644
--- a/src/ne_session.h
+++ b/src/ne_session.h
@@ -61,6 +61,11 @@ typedef enum ne_session_flag_e {
NE_SESSFLAG_SSLv2, /* disable this flag to disable support for
* SSLv2, if supported by the SSL library. */
+ NE_SESSFLAG_RFC4918, /* enable this flag to enable support for
+ * RFC4918-only WebDAV features; losing
+ * backwards-compatibility with RFC2518
+ * servers. */
+
NE_SESSFLAG_LAST /* enum sentinel value */
} ne_session_flag;