|  |  | @ -126,23 +126,6 @@ static void appendToFirstOccurence(string &content, const string regex, const st | 
			
		
	
		
		
			
				
					
					|  |  |  |   regfree(®exp); |  |  |  |   regfree(®exp); | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | static char charFromHex(std::string a) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::istringstream Blat (a); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   int Z; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   Blat >> std::hex >> Z; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   return char (Z); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | static void unescapeUrl(string &url) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::string::size_type pos; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::string hex; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   while (std::string::npos != (pos = url.find('%'))) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       hex = url.substr(pos + 1, 2); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       url.replace(pos, 3, 1, charFromHex(hex)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   return; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | static int accessHandlerCallback(void *cls, |  |  |  | static int accessHandlerCallback(void *cls, | 
			
		
	
		
		
			
				
					
					|  |  |  | 				 struct MHD_Connection * connection, |  |  |  | 				 struct MHD_Connection * connection, | 
			
		
	
		
		
			
				
					
					|  |  |  | 				 const char * url, |  |  |  | 				 const char * url, | 
			
		
	
	
		
		
			
				
					|  |  | @ -198,7 +181,6 @@ static int accessHandlerCallback(void *cls, | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
		
		
			
				
					
					|  |  |  |     /* urlstr */ |  |  |  |     /* urlstr */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     std::string urlStr = string(url); |  |  |  |     std::string urlStr = string(url); | 
			
		
	
		
		
			
				
					
					|  |  |  |     unescapeUrl(urlStr); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
		
		
			
				
					
					|  |  |  |     /* Mutex Lock */ |  |  |  |     /* Mutex Lock */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     pthread_mutex_lock(&readerLock); |  |  |  |     pthread_mutex_lock(&readerLock); | 
			
		
	
	
		
		
			
				
					|  |  | @ -208,7 +190,7 @@ static int accessHandlerCallback(void *cls, | 
			
		
	
		
		
			
				
					
					|  |  |  |       cout << "Loading '" << urlStr << "'... " << endl; |  |  |  |       cout << "Loading '" << urlStr << "'... " << endl; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     try { |  |  |  |     try { | 
			
		
	
		
		
			
				
					
					|  |  |  |       reader->getContent(urlStr, content, contentLength, mimeType); |  |  |  |       reader->getContentByUrl(urlStr, content, contentLength, mimeType); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       if (verboseFlag) { |  |  |  |       if (verboseFlag) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	cout << "content size: " << contentLength << endl; |  |  |  | 	cout << "content size: " << contentLength << endl; | 
			
		
	
	
		
		
			
				
					|  |  | 
 |