url: Handle relative urls being just a new query string
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
		
				
					committed by
					
						
						Martin Storsjö
					
				
			
			
				
	
			
			
			
						parent
						
							a6363e3d89
						
					
				
				
					commit
					eea003814c
				
			@@ -3417,6 +3417,12 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
 | 
				
			|||||||
    if (path_query != NULL)
 | 
					    if (path_query != NULL)
 | 
				
			||||||
        *path_query = '\0';
 | 
					        *path_query = '\0';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* Is relative path just a new query part? */
 | 
				
			||||||
 | 
					    if (rel[0] == '?') {
 | 
				
			||||||
 | 
					        av_strlcat(buf, rel, size);
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Remove the file name from the base url */
 | 
					    /* Remove the file name from the base url */
 | 
				
			||||||
    sep = strrchr(buf, '/');
 | 
					    sep = strrchr(buf, '/');
 | 
				
			||||||
    if (sep)
 | 
					    if (sep)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user