diff options
author | Marton Balint <cus@passwd.hu> | 2020-02-03 23:06:09 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-02-15 18:41:36 +0100 |
commit | 987ce96d41d21a120e6109f9bb1e3a9dcddbf30b (patch) | |
tree | 5c9814bf75dece2c7fbe6cfbd172f373a86f3d18 /libavformat | |
parent | 554576b6cfe79a91d37e14d3617ca417562085db (diff) | |
download | ffmpeg-987ce96d41d21a120e6109f9bb1e3a9dcddbf30b.tar.gz |
avformat/http: split the fragment part from the HTTP URL before the request
RFC 3986 states that the fragment identifier is separated from the rest of the
URI prior to a dereference, and thus the identifying information within the
fragment itself is dereferenced solely by the user agent.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/http.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 142511d091..5411aa0f29 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -190,6 +190,7 @@ void ff_http_init_auth_state(URLContext *dest, const URLContext *src) static int http_open_cnx_internal(URLContext *h, AVDictionary **options) { const char *path, *proxy_path, *lower_proto = "tcp", *local_path; + char *hashmark; char hostname[1024], hoststr[1024], proto[10]; char auth[1024], proxyauth[1024] = ""; char path1[MAX_URL_SIZE]; @@ -215,6 +216,10 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options) if (port < 0) port = 80; + hashmark = strchr(path1, '#'); + if (hashmark) + *hashmark = '\0'; + if (path1[0] == '\0') path = "/"; else |