[PATCH] nginx support parse a URL to IPv6

Maxim Dounin mdounin at mdounin.ru
Tue Mar 1 12:11:28 MSK 2011


Hello!

On Mon, Feb 28, 2011 at 06:32:40PM -0800, Jiankuan Xing wrote:

> Hey, guys. I've implement a parse URL to IPv6 function which is 
> discussed in "http://forum.nginx.org/read.php?2,177146,177190". 
> I change "ngx_parse_url" and add an function "ngx_parse_host" to 
> resolve a host (IP or text) to either IPv4 or IPv6 functions. 
> And I change "ngx_inet_resolve_host" to let it accept IPv4/IPv6. 
> Besides I add another function "ngx_inet_sock_addr" to parse 
> string with format "ipv4:port" and "[ipv6]:port" to the addr 
> structure. Seems I can't upload the attachment so I past them 
> here. I've do the unit test to them. Hope you can take 
> regression test and merge them to the nginx main branch. 
> 
> If u wish, I can also past the unit test I write. The change is 
> a big one so I recommend directly submit a source code. But as 
> convention, here is the diff: 

Diffs are good enough for changes of any size.  But again: unified 
diff, please.  Traditional diff format is completely unreadable.

Something like

diff -up file.old file.new

is known to produce good diffs for single file.

Maxim Dounin



More information about the nginx-devel mailing list