Webboard: Problem with national chars in URL

[email protected]
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <[email protected]>
Author: Alexander Barkov
Email: [email protected]
Message:
This patch fixes the problem:





--- indexer.c	27 Jan 2011 13:57:22 -0000	1.522

+++ indexer.c	4 Feb 2011 06:08:32 -0000

@@ -411,6 +411,8 @@ int UdmConvertHref(UDM_AGENT *Indexer, U

       case UDM_URL_BAD:

       default:

         UdmLog(Indexer,UDM_LOG_DEBUG,"Error in URL: '%s'",Href->url);

+        Href->method= UDM_METHOD_DISALLOW;

+        goto ret;

     }

   }





   

diff -u -p -r1.45 url.c

--- url.c	27 Jan 2011 13:57:25 -0000	1.45

+++ url.c	4 Feb 2011 06:08:32 -0000

@@ -378,7 +378,12 @@ int UdmURLParse(UDM_URL *url,const char 

       }

       

       /* Convert hostname to lowercase */

-      for (s= url->hostname; *s; *s= tolower(*s), s++);

+      for (s= url->hostname; *s; *s= tolower(*s), s++)

+      {

+        /* TODO: convert to international domain format */

+        if (((unsigned char *)s)[0] > 127)

+          return UDM_URL_BAD;

+      }

     }

     else

     {



Reply: <http://www.mnogosearch.org/board/message.php?id=21203>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.