Opened 9 years ago

Closed 8 years ago

#4892 closed defect (fixed)

% in URL causes address truncation and 404 response code

Reported by: pszemus Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: http
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

% in URL causes address truncation and 404 response code

$ ./ffmpeg -loglevel trace -i http://i.wp.pl/a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg
ffmpeg version N-75567-g5e09cf7 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
  configuration: --prefix=/home/pszemus/ffmpeg-2.8/build --enable-pic --enable-pthreads --enable-libmp3lame --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-gpl --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libx264 --pkg-config-flags=--static --enable-protocol=https --enable-openssl --extra-cflags=-I/opt/WP/common.libs/inc --extra-ldflags='-L/opt/WP/common.libs/lib -ldl'
  libavutil      55.  2.100 / 55.  2.100
  libavcodec     57.  3.100 / 57.  3.100
  libavformat    57.  2.100 / 57.  2.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6.  9.100 /  6.  9.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'trace'.
Reading option '-i' ... matched as input file with argument 'http://i.wp.pl/a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input file http://i.wp.pl/a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg.
Successfully parsed a group of options.
Opening an input file: http://i.wp.pl/a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg.
[http @ 0x3ddfb40] request: GET /a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg HTTP/1.1
User-Agent: Lavf/57.2.100
Accept: */*
Range: bytes=0-
Connection: close
Host: i.wp.pl
Icy-MetaData: 1


[http @ 0x3ddfb40] header='HTTP/1.1 206 Partial Content'
[http @ 0x3ddfb40] http_code=206
[http @ 0x3ddfb40] header='Server: nginx'
[http @ 0x3ddfb40] header='Date: Tue, 29 Sep 2015 12:34:05 GMT'
[http @ 0x3ddfb40] header='Content-Type: image/jpeg'
[http @ 0x3ddfb40] header='Content-Length: 48541'
[http @ 0x3ddfb40] header='Connection: close'
[http @ 0x3ddfb40] header='Last-Modified: Tue, 29 Sep 2015 06:47:38 GMT'
[http @ 0x3ddfb40] header='ETag: "560a340a-bd9d"'
[http @ 0x3ddfb40] header='Expires: Tue, 06 Oct 2015 07:53:17 GMT'
[http @ 0x3ddfb40] header='Cache-Control: max-age=604800'
[http @ 0x3ddfb40] header='Access-Control-Allow-Origin: *'
[http @ 0x3ddfb40] header='Content-Range: bytes 0-48540/48541'
[http @ 0x3ddfb40] header=''
Probing image2 score:50 size:2048
Probing jpeg_pipe score:6 size:2048
[image2 @ 0x3ddf220] Format image2 probed with size=2048 and score=50
[http @ 0x3de3720] request: GET /a/f/jpeg/35754/gwiazdy_z_tr HTTP/1.1
User-Agent: Lavf/57.2.100
Accept: */*
Range: bytes=0-
Connection: close
Host: i.wp.pl
Icy-MetaData: 1


[http @ 0x3de3720] header='HTTP/1.1 404 Not Found'
[http @ 0x3de3720] http_code=404
[http @ 0x3de3720] HTTP error 404 Not Found
[image2 @ 0x3ddf220] Could find no file with path 'http://i.wp.pl/a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg' and index in the range 0-4
[AVIOContext @ 0x3deb2c0] Statistics: 33856 bytes read, 0 seeks
http://i.wp.pl/a/f/jpeg/35754/gwiazdy_z_tr%D1dzikiem_EN_01117460_3546.jpeg: No such file or directory

Change History (2)

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavformat
Keywords: http added
Status: newopen
Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 8 years ago

Resolution: fixed
Status: openclosed

The provided test case was fixed in 7ccedc1c78c9a5140758f515d46ce23de6e6a7d2

Note: See TracTickets for help on using tickets.