summaryrefslogtreecommitdiff
path: root/test/props.c
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2009-12-14 20:55:43 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2009-12-14 20:55:43 +0000
commit3bc838b8622bfd8d9139628ed453032155f330c7 (patch)
tree91c99ef12bf6d6bb561e6dd75390dde14f86d826 /test/props.c
parent16890ba7cbd9e191c7dc8fa46b6993fd68d6bfb9 (diff)
downloadneon-3bc838b8622bfd8d9139628ed453032155f330c7.tar.gz
* test/auth.c, test/redirect.c, test/props.c: Adapt to use
session_server, proxied_session_server. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1756 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'test/props.c')
-rw-r--r--test/props.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/props.c b/test/props.c
index fc12732..ce650f9 100644
--- a/test/props.c
+++ b/test/props.c
@@ -1,6 +1,6 @@
/*
Tests for property handling
- Copyright (C) 2002-2008, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 2002-2009, Joe Orton <joe@manyfish.co.uk>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -242,13 +242,15 @@ static int tos_endprop(void *userdata, int state,
static int run_207_response(char *resp, const char *expected)
{
ne_buffer *buf = ne_buffer_create();
- ne_session *sess = ne_session_create("http", "localhost", 7777);
+ ne_session *sess;
ne_xml_parser *p = ne_xml_create();
ne_207_parser *p207;
- ne_request *req = ne_request_create(sess, "PROPFIND", "/foo");
+ ne_request *req;
ne_uri base = {0};
struct propctx ctx;
+ CALL(session_server(&sess, single_serve_string, resp));
+ req = ne_request_create(sess, "PROPFIND", "/foo");
ne_fill_server_uri(sess, &base);
base.path = ne_strdup("/foo");
p207 = ne_207_create(p, &base, buf);
@@ -263,7 +265,6 @@ static int run_207_response(char *resp, const char *expected)
ctx.p207 = p207;
ne_xml_push_handler(p, tos_startprop, tos_cdata, tos_endprop, &ctx);
- CALL(spawn_server(7777, single_serve_string, resp));
ONREQ(ne_request_dispatch(req));
@@ -592,14 +593,14 @@ static int propfind(void)
0, PF_SIMPLE},
/* whitespace handling. */
- { MULTI_207(RESP_207("\r\nhttp://localhost:7777/alpha ",
+ { MULTI_207(RESP_207("\r\nhttp://localhost/alpha ",
PSTAT_207(PROPS_207(APROP_207("alpha", "beta"))
"<D:status>\r\nHTTP/1.1 200 OK </D:status>"))),
"results(/alpha,prop:[{DAV:,alpha}='beta':{200 OK}];)//",
0, PF_SIMPLE},
/* attribute handling. */
- { MULTI_207(RESP_207("\r\nhttp://localhost:7777/alpha ",
+ { MULTI_207(RESP_207("\r\nhttp://localhost/alpha ",
PSTAT_207(PROPS_207("<D:alpha>"
"<D:foo D:fee='bar' bar='fee'>beta</D:foo></D:alpha>")
"<D:status>\r\nHTTP/1.1 200 OK </D:status>"))),