~ubuntu-branches/ubuntu/trusty/serf/trusty-security

« back to all changes in this revision

Viewing changes to debian/patches/ip6-localhost

  • Committer: Bazaar Package Importer
  • Author(s): Peter Samuelson
  • Date: 2011-06-27 18:09:28 UTC
  • mfrom: (1.2.5 upstream)
  • mto: (3.3.1 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20110627180928-ybwzd3hmx82nu3ir
Tags: 1.0.0~0+svn1514-1
* New upstream snapshot.
  - patches/abi-0.x: Remove as obsolete.
  - patches/kqueue: Forward-port.
  - Bump ABI: libserf0.7{,-dbg} -> libserf1{,-dbg}
  - patches/ip6-localhost: New patch: temporary (I hope) workaround for
    IPv4 / IPv6 confusion in testsuite.
* Implement Multi-Arch: same.
* libserf-dev Conflicts: libserf-0-0-dev, not Breaks.  Thanks, lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Temporary workaround for testsuite problem wherein serf looks up
 
2
'localhost' but then expects to be able to use it with an IPv6 socket.
 
3
I'm not sure of the details, but using 'ip6-localhost' everywhere works.
 
4
 
 
5
 
 
6
--- a/test/test_util.c
 
7
+++ b/test/test_util.c
 
8
@@ -27,13 +27,13 @@
 
9
 /* Server setup function(s)
 
10
  */
 
11
 
 
12
-#define SERV_URL "http://localhost:" SERV_PORT_STR
 
13
+#define SERV_URL "http://ip6-localhost:" SERV_PORT_STR
 
14
 
 
15
 static apr_status_t default_server_address(apr_sockaddr_t **address,
 
16
                                            apr_pool_t *pool)
 
17
 {
 
18
     return apr_sockaddr_info_get(address,
 
19
-                                 "localhost", APR_UNSPEC, SERV_PORT, 0,
 
20
+                                 "ip6-localhost", APR_UNSPEC, SERV_PORT, 0,
 
21
                                  pool);
 
22
 }
 
23
 
 
24
@@ -41,7 +41,7 @@ static apr_status_t default_proxy_addres
 
25
                                           apr_pool_t *pool)
 
26
 {
 
27
     return apr_sockaddr_info_get(address,
 
28
-                                 "localhost", APR_UNSPEC, PROXY_PORT, 0,
 
29
+                                 "ip6-localhost", APR_UNSPEC, PROXY_PORT, 0,
 
30
                                  pool);
 
31
 }
 
32
 
 
33
--- a/test/serf_request.c
 
34
+++ b/test/serf_request.c
 
35
@@ -65,7 +65,7 @@ int main(int argc, const char **argv)
 
36
     hdrs_bkt = serf_bucket_request_get_headers(req_bkt);
 
37
 
 
38
     /* FIXME: Shouldn't we be able to figure out the host ourselves? */
 
39
-    serf_bucket_headers_setn(hdrs_bkt, "Host", "localhost");
 
40
+    serf_bucket_headers_setn(hdrs_bkt, "Host", "ip6-localhost");
 
41
     serf_bucket_headers_setn(hdrs_bkt, "User-Agent",
 
42
                              "Serf/" SERF_VERSION_STRING);
 
43
 
 
44
--- a/test/test_context.c
 
45
+++ b/test/test_context.c
 
46
@@ -473,8 +473,8 @@ static void test_serf_setup_proxy(CuTest
 
47
     apr_sockaddr_t *proxy_address;
 
48
 
 
49
     test_server_message_t message_list[] = {
 
50
-        {"GET http://localhost:" SERV_PORT_STR " HTTP/1.1" CRLF\
 
51
-         "Host: localhost:" SERV_PORT_STR CRLF\
 
52
+        {"GET http://ip6-localhost:" SERV_PORT_STR " HTTP/1.1" CRLF\
 
53
+         "Host: ip6-localhost:" SERV_PORT_STR CRLF\
 
54
          "Transfer-Encoding: chunked" CRLF\
 
55
          CRLF\
 
56
          "1" CRLF\
 
57
--- a/test/test_serf.h
 
58
+++ b/test/test_serf.h
 
59
@@ -52,7 +52,7 @@ CuSuite *test_ssl(void);
 
60
 
 
61
 #define CHUNKED_REQUEST(len, body)\
 
62
         "GET / HTTP/1.1" CRLF\
 
63
-        "Host: localhost:12345" CRLF\
 
64
+        "Host: ip6-localhost:12345" CRLF\
 
65
         "Transfer-Encoding: chunked" CRLF\
 
66
         CRLF\
 
67
         #len CRLF\