| Branch: | Revision:

ffmpeg / libavformat / http.c @ 56a10009

History | View | Annotate | Download (15.1 KB)

# Date Author Comment
1869ea03 04/04/2011 03:45 PM Anton Khirnov

avio: make url_get_file_handle() internal.

e52a9145 04/04/2011 03:45 PM Anton Khirnov

avio: make url_close() internal.

925e908b 04/04/2011 03:45 PM Anton Khirnov

avio: make url_write() internal.

bc371aca 04/04/2011 03:45 PM Anton Khirnov

avio: make url_read() internal.

0589da0a 04/04/2011 03:45 PM Anton Khirnov

avio: make url_open() internal.

bc61920d 03/28/2011 02:16 AM Tyler

http: header field names are case insensitive

Amazon S3 sends header field names all lowercase.
This is actually acceptable according to the HTTP standard.

Signed-off-by: Luca Barbato <>

2912e87a 03/19/2011 01:33 PM Mans Rullgard

Replace FFmpeg with Libav in licence headers

Signed-off-by: Mans Rullgard <>

dfd2a005 01/29/2011 10:55 PM Luca Barbato

Replace dprintf with av_dlog

dprintf clashes with POSIX.1-2008

c6610a21 01/26/2011 10:10 PM Diego Elio Pettenò

Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.

This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.

7e35d859 11/02/2010 08:37 PM Mike Edenfield

http: Handle 301/307 redirect requests, too

Patch by Mike Edenfield, kutulu at kutulu dot org

Originally committed as revision 25651 to svn://

6ed04040 09/26/2010 02:25 PM Michael Niedermayer

Move AVOptions from libavcodec to libavutil

Originally committed as revision 25210 to svn://

e55ebcc3 08/19/2010 02:50 PM Martin Storsjö

Move the definition of the maximum url size for static buffers to internal.h

Originally committed as revision 24833 to svn://

f240ed18 08/09/2010 08:14 AM Martin Storsjö

http: Return EOF at the end of the content even if the connection isn't closed

We do request Connection: close, but some servers ignore it.

Originally committed as revision 24746 to svn://

db979afe 07/16/2010 02:15 PM Martin Storsjö

http: Log a warning when receiving an error code

Originally committed as revision 24266 to svn://

f3bfe388 06/27/2010 02:16 PM Måns Rullgård

Make ff_url_split() public

ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.

Originally committed as revision 23822 to svn://

9290f15d 06/22/2010 02:15 PM Martin Storsjö

Make the http protocol open the connection immediately in http_open again

Also make the RTSP protocol use url_alloc and url_connect instead of relying
on the delay open behaviour.

Originally committed as revision 23710 to svn://

4167ba0b 06/22/2010 02:13 PM Martin Storsjö

Add an AVClass to the HTTPContext

Originally committed as revision 23709 to svn://

a9a3364c 06/22/2010 02:12 PM Martin Storsjö

Allocate the HTTPContext through URLProtocol.priv_data_size

Originally committed as revision 23708 to svn://

db302347 06/21/2010 07:40 PM Martin Storsjö

HTTP: Add a method for initializing the authentication state from another connection

Originally committed as revision 23685 to svn://

17b1493f 06/21/2010 07:02 PM Martin Storsjö


Originally committed as revision 23684 to svn://

ea02b593 06/21/2010 07:02 PM Martin Storsjö

HTTP: Compact the code for writing chunked post data

Originally committed as revision 23683 to svn://

077026cc 06/21/2010 07:01 PM Martin Storsjö

HTTP: Get rid of the is_chunked variable, use the chunksize variable instead

Originally committed as revision 23682 to svn://

a6a91589 06/21/2010 06:40 PM Martin Storsjö

HTTP: Clarify a comment

Originally committed as revision 23681 to svn://

45c611a9 06/20/2010 09:41 PM Ronald S. Bultje

Reset chunksize back to zero (= no chunked encoding) after each new open
connection (e.g. a seek). This fixes the theoretical case where a server
sends a file first using chunked encoding, and then using non-chunked

Originally committed as revision 23665 to svn://

f3724695 06/20/2010 09:38 PM Ronald S. Bultje

Use url_write(), not http_write(), for sending the HTTP headers. This prevents
them from being sent using chunked encoding (I don't think this ever happened,
but either way it would be wrong).

Originally committed as revision 23664 to svn://

130b096a 06/09/2010 09:19 AM Martin Storsjö

Make sure the http protocol handler returns errors if a delayed open had failed

Originally committed as revision 23548 to svn://

bdb57a91 06/09/2010 08:29 AM Martin Storsjö

Initialize the http connection in http_seek, too

This makes url_fsize return correct values for delay opened connections
that have not yet been initialized.
This fixes using the image2 demuxer with http sources.

Originally committed as revision 23546 to svn://

e4f28e08 06/08/2010 11:58 AM Martin Storsjö


Originally committed as revision 23534 to svn://

f2b9b19f 06/08/2010 11:48 AM Josh Allmann

Add support for disabling chunked transfer encoding for the http protocol

Patch by Josh Allmann, josh dot allmann at gmail

Originally committed as revision 23531 to svn://

701ea516 06/08/2010 11:18 AM Martin Storsjö

Fix handling of errors in the http protocol

If http_connect fails, we've already stored the new connection handle in s->hd,
so clear it so http_close won't double-free it.

10l to me for not spotting it during review

Originally committed as revision 23529 to svn://

4ceb8b34 06/08/2010 11:06 AM Martin Storsjö

Fix bugs in the http custom header handling

Initialize the buffer av_strlcatf writes into.
Add the dash at the end of the Range header.

10l to me for not spotting it earlier

Originally committed as revision 23528 to svn://

6964d510 06/08/2010 10:26 AM Josh Allmann

Add the capability to write custom HTTP headers

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23526 to svn://

0f3254b8 06/08/2010 10:04 AM Josh Allmann

Modify the behaviour of http_open to implicitly delay connection establishment

The connection is made on the first http_read, http_write or http_seek.

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23525 to svn://

dd798dcd 06/04/2010 06:35 AM Martin Storsjö

http: Set http_code to 200 when doing a POST

This avoids reading and comparing uninitialized memory.

Originally committed as revision 23464 to svn://

27241cbf 06/01/2010 07:46 AM Martin Storsjö

Declare the url_write buffer parameter as const

Originally committed as revision 23401 to svn://

9405f733 03/24/2010 10:32 PM Martin Storsjö

Split out http authentication handling into a separate file

This prepares for adding support for more authentication methods

Originally committed as revision 22660 to svn://

e4a9e3cc 03/14/2010 11:59 PM Aurelien Jacobs

move ff_url_split() and ff_url_join() declarations to internal.h
those functions are not part of the public API

Originally committed as revision 22534 to svn://

f984dcf6 03/08/2010 09:05 AM Martin Storsjö


Originally committed as revision 22322 to svn://

c5c6e67c 03/08/2010 09:03 AM Martin Storsjö

Rename url_split to ff_url_split

Since this function isn't in the public API, it should have an ff_ prefix.

Originally committed as revision 22321 to svn://

57b5555c 03/05/2010 10:35 PM Martin Storsjö

Use ff_url_join for assembling URLs, instead of snprintf

This ensures proper escaping of numerical IPv6 addresses.

The RTSP (de)muxer needs its own network initialization, since it isn't
a protocol and url_open hasn't been called yet.

Originally committed as revision 22226 to svn://

08c8e66a 01/13/2010 11:27 PM Baptiste Coudurier

restore old buffer content when seek failed in http protocol, fix issue #1631

Originally committed as revision 21208 to svn://

2edabfdf 01/12/2010 04:36 PM Ronald S. Bultje

Reindent after r21166.

Originally committed as revision 21167 to svn://

08f7a8ac 01/12/2010 04:36 PM Tomas Härdin

Use chunked encoding for HTTP uploads. Patch by Tomas Härdin

Originally committed as revision 21166 to svn://

7995ed8e 06/23/2009 03:38 PM Peter Holik

Add support for "chunked" data blocks. Patch by Peter Holik (peter holik at).

Originally committed as revision 19256 to svn://

a52dc730 06/06/2009 05:32 PM Peter Holik

Cosmetics : Use dprintf instead of printf.
Patch by Peter Holik < $firstname @ $lastname . at >

Originally committed as revision 19126 to svn://

2b01a520 06/06/2009 04:46 PM Jai Menon

Cosmetics : Fix indentation after last commit.

Originally committed as revision 19125 to svn://

682d49f4 06/06/2009 04:44 PM Peter Holik

Introduce http_get_line and modify http_connect to use http_get_line.
Patch by Peter Holik <$firstname @ $lastname . at>

Originally committed as revision 19124 to svn://

f0a80394 03/03/2009 05:04 PM Ronald S. Bultje

Add url_get_file_handle(), which is used to get the file descriptor
associated with the I/O handle (e.g. the fd returned by open()). See
"[RFC] rtsp.c EOF support" thread.

There were previously some URI-specific implementations of the same idea,
e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are...

d176f903 03/03/2009 01:26 PM Ronald S. Bultje

Reduce allocated length of the HTTP authentication request field buffer, as
noticed by Stefano and Luca in the "[PATCH]RTSP Basic Authentication"
mailinglist thread.

av_base64_encode() was recently changed. The previous implementation required
12 extra bytes (ceil(len(src)/3.)*4+12), whereas the new one is guaranteed to...

406792e7 01/19/2009 03:46 PM Diego Biurrun

cosmetics: Remove pointless period after copyright statement non-sentences.

Originally committed as revision 16684 to svn://

bc5c918e 10/03/2008 10:16 AM Diego Biurrun

Remove offset_t typedef and use int64_t directly instead.
The name offset_t is easily confused with the standard off_t type and
*_t is POSIX reserved namespace if any POSIX header is included.

Originally committed as revision 15533 to svn://

245976da 05/09/2008 11:56 AM Diego Biurrun

Use full path for #includes from another directory.

Originally committed as revision 13098 to svn://

2907abed 02/02/2008 10:03 PM Reimar Döffinger

Remove a pointless cast.

Originally committed as revision 11819 to svn://

b630a39e 02/02/2008 08:58 PM Reimar Döffinger

Missing 'const' in cast.

Originally committed as revision 11814 to svn://

359154bc 12/28/2007 03:32 AM Michael Niedermayer

Revert hack which should have never been commited.
r464 | philipjsg | 2002-05-09 03:19:15 +0200 (Thu, 09 May 2002) | 3 lines

  • Add a sleep when doing the post to ffserver. Yes, this is the wrong...
a5e979f4 11/22/2007 02:27 AM Ramiro Polla

os_support.h is also needed for usleep and lseek on MinGW.

Originally committed as revision 11075 to svn://

6f3e0b21 07/19/2007 03:23 PM Panagiotis Issaris

Replace all occurrences of AVERROR_IO with AVERROR.

Originally committed as revision 9760 to svn://

f7d78f36 06/24/2007 11:27 AM Måns Rullgård

replace the uses of old string functions that Reimar missed

Originally committed as revision 9406 to svn://

75e61b0e 06/23/2007 11:10 PM Måns Rullgård

use new string functions
based on patch by Reimar Döffinger

Originally committed as revision 9401 to svn://

c8df9c63 05/17/2007 10:30 AM Alex Beregszaszi

Use usleep instead of sleep, some MinGW versions lack sleep.

Originally committed as revision 9044 to svn://

e42dba48 04/07/2007 02:09 PM Diego Biurrun


Originally committed as revision 8641 to svn://

bd03c380 03/19/2007 12:48 AM Luca Barbato

expose av_base64_decode and av_base64_encode

Originally committed as revision 8448 to svn://

ecb4a895 03/12/2007 02:51 PM Ronald S. Bultje

Properly initialize filesize during input buffer initialization.
patch by Ronald S. Bultje, rbultje ronald.bitfreak net

Originally committed as revision 8343 to svn://

7b19aa64 03/06/2007 01:38 PM Alex Beregszaszi

handle http error codes

Originally committed as revision 8272 to svn://

167c5531 03/04/2007 11:59 AM Ronald S. Bultje

Close connection on EOF
this makes downloading some asx files from MS
streaming servers work again (they would hang on eos).
The http request header property connection:close is needed for some
1.1 HTTP servers to close the connection at the end of file....

a3fd2bd8 03/04/2007 11:52 AM Ronald S. Bultje

make HTTP MOVED messages also work in ffmpeg (302 is essentially the same as 303).
patch by "Ronald S. Bultje" % rbultje A ronald P bitfreak P net%
original thread:
Date: Mar 4, 2007 1:21 AM
Subject: [Ffmpeg-devel] http move

Originally committed as revision 8219 to svn://

558b86a5 02/28/2007 03:40 AM Luca Barbato

Reverting stray commit part II, r8156 had the base64 export patch mixed with the nutdec patch

Originally committed as revision 8158 to svn://

9fca9c03 02/28/2007 03:37 AM Luca Barbato

Reverting stray commit part I

Originally committed as revision 8157 to svn://

bb0eb714 02/28/2007 03:28 AM Luca Barbato

get_packetheader() forgot to read the header_checksum in big packets
patch from Clemens Ladisch cladisch AT fastmail dot net
(stray base64 patch reverted in the next commits)

Originally committed as revision 8156 to svn://

8fa36ae0 02/13/2007 06:26 PM François Revol

This fixes error handling for BeOS, removing the need for some ifdefs.
AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h.
Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed....

42572ef5 02/04/2007 05:05 PM Ramiro Polla

move networking #includes into separate file
patch by Ramiro Polla angustia =a= arrozcru =d= no-ip =d= org

Originally committed as revision 7817 to svn://

706c0d65 01/25/2007 10:01 AM Guillaume Poirier

use more portable PRIu64

Originally committed as revision 7707 to svn://

e9d511dc 01/18/2007 05:22 PM François Revol

The long awaited BeOS cleanup, phase 1

Originally committed as revision 7581 to svn://

fb2b4fc5 01/14/2007 10:02 PM Ronald S. Bultje

add support for HTTP seeking
patch by Ronald S. Bultje % rbultje A ronald P bitfreak P net %
Original thread:
Date: Jan 4, 2007 5:42 AM
Subject: [Ffmpeg-devel] [PATCH/RFC] http seeking

Originally committed as revision 7505 to svn://

a7c6aa73 10/29/2006 11:53 AM Ryan Martell

switch to common base64 routines in lavf
Patch by Ryan Martell % rdm4 A martellventures P com %
Original thread:
Date: Oct 29, 2006 2:45 AM
Subject: Re: [Ffmpeg-devel] [PATCH] Base64 code

Originally committed as revision 6832 to svn://

b78e7197 10/07/2006 03:30 PM Diego Biurrun

Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://

cfc4bd46 07/19/2006 08:06 AM I. Po

Fix memleak, patch by I. Po % yyymmmm # gmail O com %
Original thread:
Date: Jul 18, 2006 3:49 PM
Subject: Re: [Ffmpeg-devel] [PATCH] http.c: http_connect() memleak

Originally committed as revision 5785 to svn://

7028259a 07/18/2006 06:51 PM Michael Niedermayer

simplify b64_encode()
maybe this should be moved to libavutil ...

Originally committed as revision 5782 to svn://

5509bffa 01/12/2006 10:43 PM Diego Biurrun

Update licensing information: The FSF changed postal address.

Originally committed as revision 4842 to svn://

115329f1 12/17/2005 06:14 PM Diego Biurrun

COSMETICS: Remove all trailing whitespace.

Originally committed as revision 4749 to svn://

88730be6 02/24/2005 07:08 PM Måns Rullgård

kill warnings patch by (Måns Rullgård <mru inprovide com>)

Originally committed as revision 3977 to svn://

568e18b1 01/08/2005 02:21 PM Michael Niedermayer

integer overflows, heap corruption
possible arbitrary code execution cannot be ruled out in some cases
precautionary checks

Originally committed as revision 3813 to svn://

6ba5cbc6 08/12/2004 12:09 AM Petr Doubek

HTTP Authentication Patch by (Petr Doubek <doubek at vision dot ee dot ethz dot ch>)
tested and submitted by (Torsten Spindler <spindler at hbt dot arch dot ethz dot ch>)

Originally committed as revision 3381 to svn://

0bd586c5 06/19/2004 03:59 AM Mike Melanson

sweeping change from -EIO -> AVERROR_IO

Originally committed as revision 3239 to svn://

9eef2b77 03/14/2004 02:59 AM Michael Niedermayer

no read loop tcp/http and http CRLF fix by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)

Originally committed as revision 2885 to svn://

4250dafc 12/08/2003 05:50 PM Alex Beregszaszi


Originally committed as revision 2575 to svn://

4358d5de 09/08/2003 08:04 PM Fabrice Bellard

removed ctype.h header

Originally committed as revision 2225 to svn://

ce2749d2 03/09/2003 04:07 PM Alex Beregszaszi


Originally committed as revision 1655 to svn://

0c1a9eda 02/11/2003 04:35 PM Zdenek Kabelac
  • UINTX -> uintx_t INTX -> intx_t

Originally committed as revision 1578 to svn://

abac6175 11/25/2002 07:07 PM Fabrice Bellard

renamed libav to libavformat

Originally committed as revision 1276 to svn://