From 9171a5bd723a65f346b27fcd136d8cc775a2df13 Mon Sep 17 00:00:00 2001
From: Jean-Paul Bonnet <bonnet.jp@gmail.com>
Date: Sun, 1 Apr 2012 00:51:42 +0100
Subject: [PATCH] * Added fix for IPV6 litteral URL port retrieval

Using a research from the end of the host.data ROI
eg: [::1]:2001
---
 src/mk_request.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mk_request.c b/src/mk_request.c
index f98ae8d..2caa7a8 100644
--- a/src/mk_request.c
+++ b/src/mk_request.c
@@ -238,7 +238,7 @@ static int mk_request_header_process(struct session_request *sr)
                                  mk_rh_host.len);
 
     if (host.data) {
-        if ((pos_sep = mk_string_char_search(host.data, ':', host.len)) >= 0) {
+        if ((pos_sep = mk_string_char_search_r(host.data, ':', host.len)) >= 0) {
             /* TCP port should not be higher than 65535 */
             char _port[6];
 
-- 
1.7.4.1

