This is the diff to fix the problem of <a href="http://forum.nginx.org/read.php?2,214541">http://forum.nginx.org/read.php?2,214541</a><div><br></div><div>Can this be integrated into main branch? Thanks.</div><div><br></div>
<div><br></div><div><div>--- ngx_http_request.c<span class="Apple-tab-span" style="white-space:pre"> </span>2011-08-24 05:21:59.354049000 -0700</div><div>+++ ngx_http_request.c.backup<span class="Apple-tab-span" style="white-space:pre"> </span>2011-08-24 05:05:33.244048997 -0700</div>
<div>@@ -1658,20 +1658,10 @@</div><div> size_t i, last;</div><div> ngx_uint_t dot;</div><div> </div><div>-#if (NGX_HAVE_INET6)</div><div>- ngx_uint_t ipv6 = 0;</div><div>-#endif</div><div>-</div><div>
last = len;</div><div> h = *host;</div><div> dot = 0;</div><div> </div><div>-#if (NGX_HAVE_INET6)</div><div>- if (len > 0 && h[0] == '[') {</div><div>- ipv6 = 1;</div><div>- } </div>
<div>-#endif</div><div>-</div><div> for (i = 0; i < len; i++) {</div><div> ch = h[i];</div><div> </div><div>@@ -1687,13 +1677,7 @@</div><div> dot = 0;</div><div> </div><div> if (ch == ':') {</div>
<div>-#if (NGX_HAVE_INET6)</div><div>- if (!ipv6) {</div><div>- last = i;</div><div>- }</div><div>-#else</div><div> last = i;</div><div>-#endif</div><div> continue;</div>
<div> }</div><div> </div><div>@@ -1704,11 +1688,6 @@</div><div> if (ch >= 'A' || ch < 'Z') {</div><div> alloc = 1;</div><div> }</div><div>-#if (NGX_HAVE_INET6)</div>
<div>- if (ch == ']') {</div><div>- ipv6 = 0;</div><div>- }</div><div>-#endif</div><div> }</div><div> </div><div> if (dot) {</div></div><div><br></div><div><br></div>