summaryrefslogtreecommitdiff
path: root/lib/file.c
Commit message (Collapse)AuthorAgeFilesLines
* RTSP: convert protocol-specific checks to genericDaniel Stenberg2011-05-051-0/+1
| | | | | Add a 'readwrite' function to the protocol handler struct and use that for the extra readwrite functionality RTSP needs.
* remove FILE protocol-specific checksDaniel Stenberg2011-05-051-1/+1
| | | | | Also, convert the BANPROXY flag into NONETWORK for the protocols (file:// only atm) that don't work over networks.
* whitespace cleanup: no space first in conditionalsDaniel Stenberg2011-04-271-3/+3
| | | | "if(a)" is our style, not "if( a )"
* source cleanup: unify look, style and indent levelsDaniel Stenberg2011-04-271-7/+7
| | | | | By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
* protocols: use CURLPROTO_ internallyDaniel Stenberg2011-03-141-1/+1
| | | | | | | | | | | The PROT_* set of internal defines for the protocols is no longer used. We now use the same bits internally as we have defined in the public header using the CURLPROTO_ prefix. This is for simplicity and because the PROT_* prefix was already used duplicated internally for a set of KRB4 values. The PROTOPT_* defines were moved up to just below the struct definition within which they are used.
* protocol handler: added flags fieldDaniel Stenberg2011-03-141-1/+2
| | | | | | | | | | | | | | | | | | | | The protocol handler struct got a 'flags' field for special information and characteristics of the given protocol. This now enables us to move away central protocol information such as CLOSEACTION and DUALCHANNEL from single defines in a central place, out to each protocol's definition. It also made us stop abusing the protocol field for other info than the protocol, and we could start cleaning up other protocol-specific things by adding flags bits to set in the handler struct. The "protocol" field connectdata struct was removed as well and the code now refers directly to the conn->handler->protocol field instead. To make things work properly, the code now always store a conn->given pointer that points out the original handler struct so that the code can learn details from the original protocol even if conn->handler is modified along the way - for example when switching to go over a HTTP proxy.
* transfer: avoid insane conversion of time_tStefan Krause2011-03-041-1/+1
|
* Curl_gmtime: added a portable gmtimeDaniel Stenberg2011-02-071-7/+6
| | | | | | Instead of polluting many places with #ifdefs, we create a single place for this function, and also check return code properly so that a NULL pointer returned won't cause problems.
* file: add support for CURLOPT_TIMECONDITIONDave Reisner2011-01-311-0/+7
|
* s/isspace/ISSPACEYang Tse2010-11-261-1/+1
|
* file_range: remove unnecessary check for NULL pointerDaniel Stenberg2010-04-161-1/+1
|
* file_range: Value stored to 'totalsize' is never readDaniel Stenberg2010-04-161-3/+2
|
* remove the CVSish $Id$ linesDaniel Stenberg2010-03-241-1/+0
|
* Make usage of calloc()'s arguments consistent with rest of code baseYang Tse2009-11-181-1/+1
|
* allow building libcurl for VxWorksYang Tse2009-06-041-2/+8
|
* libcurl's memory.h renamed to curl_memory.hYang Tse2009-04-211-1/+1
|
* - Hidemoto Nakada provided a small fix that makes it possible to get theDaniel Stenberg2009-02-031-1/+5
| | | | | CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with CURLOPT_NOBODY set true.
* - Using the libssh2 0.19 function libssh2_session_block_directions(), libcurlDaniel Stenberg2008-12-191-0/+1
| | | | | | | now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss.
* Added some #ifdefs around header files and change the EAGAIN test toDan Fandrich2008-11-141-0/+2
| | | | fix compilation on Cell (reported by Jeff Curley).
* CURLINFO_FILETIME now works for file:// transfers as wellDaniel Stenberg2008-11-041-0/+2
|
* Removed unneeded includes of signal.h and setjmp.hDan Fandrich2008-09-291-1/+0
|
* ANSI C compatibility fixYang Tse2008-09-121-1/+2
|
* Checked in some code improvements and minor fixes that I discovered in theDan Fandrich2008-09-101-1/+1
| | | | FreeBSD ports system.
* remove unnecessary typecasting of calloc()Yang Tse2008-09-061-1/+1
|
* Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TUYang Tse2008-08-161-8/+7
| | | | | | | | | | | | remain in use as internal curl_off_t print formatting strings for the internal *printf functions which still cannot handle print formatting string directives such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and other DOS/Windows compilers. This reverts previous commit part which did: FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
* For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,Yang Tse2008-08-151-7/+8
| | | | | | | | | | | | | | the names of the curl_off_t formatting string directives now become CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU. CURL_FMT_OFF_T -> CURL_FORMAT_CURL_OFF_T CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU Remove the use of an internal name for the curl_off_t formatting string directives and use the common one available from the inside and outside of the library. FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
* Renamed MSDOS_FILESYSTEM to avoid conflict with MIT GSSDan Fandrich2008-05-211-5/+5
|
* Added support for running on Symbian OS.Dan Fandrich2008-04-221-1/+1
|
* Some trivial changesDan Fandrich2008-04-171-7/+10
|
* - Dmitry Kurochkin moved several struct fields from the connectdata struct toDaniel Stenberg2008-01-311-1/+1
| | | | | | the SingleRequest one to make pipelining better. It is a bit tricky to keep them in the right place, to keep things related to the actual request or to the actual connection in the right place.
* fix compiler warningYang Tse2008-01-111-5/+4
|
* Daniel Egger made CURLOPT_RANGE work on file:// URLs the very same way itDaniel Stenberg2008-01-111-5/+84
| | | | already worked for FTP:// URLs
* All static functions that were previously name Curl_* something no longerDaniel Stenberg2007-12-081-13/+13
| | | | | use that prefix as we use that prefix only for library-wide internal global symbols.
* struct HandleData is now called struct SingleRequest, and is only for data thatDaniel Stenberg2007-11-241-23/+23
| | | | | | | | | | | is inited at the start of the DO action. I removed the Curl_transfer_keeper struct completely, and I had to move out a few struct members (that had to be set before DO or used after DONE) to the UrlState struct. The SingleRequest struct is accessed with SessionHandle->req. One of the biggest reasons for doing this was the bunch of duplicate struct members in HandleData and Curl_transfer_keeper since it was really messy to keep track of two variables with the same name and basically the same purpose!
* Rearranged code and changed Curl_readwrite_init() and Curl_pre_readwrite() intoDaniel Stenberg2007-11-151-1/+0
| | | | | | do_init() and do_complete() which now are called first and last in the DO function. It simplified the flow in multi.c and the functions got more sensible names!
* if () => if()Daniel Stenberg2007-11-071-11/+11
| | | | | while () => while() and some other minor re-indentings
* Fixed an OOM problem with file: URLsDan Fandrich2007-10-301-5/+4
| | | | Moved Curl_file_connect into the protocol handler struct.
* File is not a protocol that can deal with "persistancy"Yang Tse2007-10-231-0/+10
|
* Michal Marek forwarded the bug reportDaniel Stenberg2007-10-221-13/+15
| | | | | | | | | | | | | | | https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to FTP that caused memory havoc. His work together with my efforts created two fixes: #1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with at connection cleanup, at which time the struct HandleData could be used by another connection. Also, the unused char *urlpath member is removed from struct FTP. #2 - provide a Curl_reset_reqproto() function that frees data->reqdata.proto.* on connection setup if needed (that is if the SessionHandle was used by a different connection).
* We use this ZERO_NULL to avoid picky compiler warnings,Yang Tse2007-10-171-8/+8
| | | | when assigning a NULL pointer to a function pointer var.
* Made a few more functions static with the protocol handler table in place.Dan Fandrich2007-10-131-2/+4
|
* Added per-protocol callback static tables, replacing callback ptr storagePatrick Monnerat2007-10-121-1/+28
| | | | in the connectdata structure by a single handler table ptr.
* Enabled a few more gcc warnings with --enable-debug. Renamed a fewDan Fandrich2007-09-271-3/+3
| | | | variables to avoid shadowing global declarations.
* Added lots of constsDan Fandrich2007-08-291-4/+4
|
* Bug report #1779751 (http://curl.haxx.se/bug/view.cgi?id=1779751) pointedDaniel Stenberg2007-08-221-3/+6
| | | | | | out that doing first a file:// upload and then an FTP upload crashed libcurl or at best caused furious valgrind complaints. Fixed now by making sure we free and clear the file-specific struct properly when done with it.
* Implemented only the parts of Patrick Monnerat's OS/400 patch that renamedDan Fandrich2007-07-231-1/+1
| | | | | some few internal identifiers to avoid conflicts, which could be useful on other platforms.
* Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMSJames Housley2007-06-281-2/+1
| | | | | file.c, but the debug interface was missing. This adds the routines needed to make the memory debuging work for fdopen().
* Add two new options for the SFTP/SCP/FILE protocols: CURLOPT_NEW_FILE_PERMSJames Housley2007-06-271-1/+16
| | | | | | and CURLOPT_NEW_DIRECTORY_PERMS. These control the premissions for files and directories created on the remote server. CURLOPT_NEW_FILE_PERMS defaults to 0644 and CURLOPT_NEW_DIRECTORY_PERMS defaults to 0755
* Fixed a compiler warning on uClibc.Dan Fandrich2007-06-071-1/+1
|
* Feng Tu made (lib)curl support "upload" resuming work for file:// URLs.Daniel Stenberg2007-05-311-2/+35
|