Patch level :2.0 partners 626
Files correlati :ba1.exe Ricompilazione Demo : [ ] Commento :aggiunta modifica necessaria x aggiornare dalla directory release via web;il tag <href> deve poter essere letto sia minuscolo che maiuscolo (problema sorto con l'aggiornamento dell'http server su savik) git-svn-id: svn://10.65.10.50/trunk@11545 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									35abf9e371
								
							
						
					
					
						commit
						205436a6b1
					
				| @ -738,6 +738,21 @@ bool TSocketClient::HttpGetFile(CONNID id, const char* remote, const char* local | ||||
|   } | ||||
|   return ok; | ||||
| } | ||||
| 
 | ||||
| HIDDEN int find_href(const TString& riga) | ||||
| { | ||||
|   int href = -1; | ||||
|   int img = riga.find("<img"); | ||||
|   if (img >= 0) | ||||
|     href = riga.find("href=", img+4); | ||||
|   else | ||||
|   { | ||||
|     img = riga.find("<IMG"); | ||||
|     if (img >= 0) | ||||
|       href = riga.find("HREF=", img+4); | ||||
|   } | ||||
|   return href; | ||||
| } | ||||
|   | ||||
| bool TSocketClient::HttpGetDir(CONNID id, const char* remote, TString_array& list) | ||||
| { | ||||
| @ -750,9 +765,8 @@ bool TSocketClient::HttpGetDir(CONNID id, const char* remote, TString_array& lis | ||||
|     while (!s.eof()) | ||||
|     { | ||||
|       s.getline(riga.get_buffer(), riga.size()); | ||||
|       const int img = riga.find("<IMG"); | ||||
|       const int href = riga.find("HREF="); | ||||
|       if (img >= 0 && href > img) | ||||
|       const int href = find_href(riga); | ||||
|       if (href > 0) | ||||
|       { | ||||
|         const int start = riga.find('"', href) + 1; | ||||
|         if (start > href && isalnum(riga[start + 1])) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user