--------------------- PatchSet 1406 Date: 2005/05/22 14:25:44 Author: rmartinez Branch: squid3-ipv6 Tag: (none) Log: Fixing URL format into IPv6 Members: src/internal.cc:1.5.8.1->1.5.8.2 Index: squid3/src/internal.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/internal.cc,v retrieving revision 1.5.8.1 retrieving revision 1.5.8.2 diff -u -r1.5.8.1 -r1.5.8.2 --- squid3/src/internal.cc 25 Apr 2005 13:40:11 -0000 1.5.8.1 +++ squid3/src/internal.cc 22 May 2005 14:25:44 -0000 1.5.8.2 @@ -1,6 +1,6 @@ /* - * $Id: internal.cc,v 1.5.8.1 2005/04/25 13:40:11 rmartinez Exp $ + * $Id: internal.cc,v 1.5.8.2 2005/05/22 14:25:44 rmartinez Exp $ * * DEBUG: section 76 Internal Squid Object handling * AUTHOR: Duane, Alex, Henrik @@ -118,11 +118,20 @@ /* build uri in mb */ memBufReset(&mb); - memBufPrintf(&mb, "http://%s", lc_host); /* append port if not default */ if (port && port != urlDefaultPort(PROTO_HTTP)) - memBufPrintf(&mb, ":%d", port); + { + memBufPrintf(&mb, "http://%s%s%s:%d", + NEEDS_BRACKETS(lc_host)? "[":null_string, + lc_host, + NEEDS_BRACKETS(lc_host)? "]":null_string, + port); + } + else + { + memBufPrintf(&mb, "http://%s", lc_host); + } if (dir) memBufPrintf(&mb, "%s", dir);