http-client: 'http-fetch/cached' converts strings to URIs.
* guix/http-client.scm (http-fetch/cached): Use 'string->uri' if URI is a string, as with 'http-fetch'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
		
							parent
							
								
									00a5a07bb2
								
							
						
					
					
						commit
						ae533e3084
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -314,7 +314,10 @@ added automatically as appropriate. | ||||||
| TIMEOUT specifies the timeout in seconds for connection establishment. | TIMEOUT specifies the timeout in seconds for connection establishment. | ||||||
| 
 | 
 | ||||||
| Write information about redirects to LOG-PORT." | Write information about redirects to LOG-PORT." | ||||||
|   (let ((file (cache-file-for-uri uri))) |   (let* ((uri (if (string? uri) | ||||||
|  |                   (string->uri uri) | ||||||
|  |                   uri)) | ||||||
|  |          (file (cache-file-for-uri uri))) | ||||||
|     (define (update-cache cache-port) |     (define (update-cache cache-port) | ||||||
|       (define cache-time |       (define cache-time | ||||||
|         (and cache-port |         (and cache-port | ||||||
|  |  | ||||||
		Reference in a new issue