summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch/util.c
Commit message (Collapse)AuthorAgeFilesLines
* time() needs a pointer to a time_t, but tv_sec in a timeval is ajb1998-02-201-2/+4
| | | | | long (yuk). So give time() what it wants and let the compiler promote the variable when it is assigned to tv_sec.
* Fix remote request for HTTP proxies. Should close PR#2670.wollman1997-02-111-2/+2
|
* Fix off-by-one error in proxy host:port parser.wollman1997-02-071-2/+1
| | | | Submitted by: fenner
* Some bug-fixes, clean-ups, and one new feature:wollman1997-02-051-14/+24
| | | | | | | | | | | | | | - Fix the bug with URIs of the form ftp://host/filename. - Fix some more string-termination bugs in util.c. - Use safe_malloc() rather than testing the return value of regular malloc() in 15 places. - Implement HTTP authentication, for both servers and proxies. Currently only ``basic'' authentication is supported; This Is A Bug (but less of one tjhan nmot supporting any authentication). I think there is only one more feature which is required for full HTTP/1.1 support, which is Transfer-Encoding: chunked; this should not be toohard, but it isn't very important, either.
* Null-terminate the string in percent_decode() so that we don't depend onbde1997-02-021-1/+2
| | | | | | malloc() returning zeroed storage or dump core while starting up. Found-by: /etc/malloc.conf ->AJ
* Here is my long-threatened revamping of fetch. Jean-Marc probably won'twollman1997-01-301-0/+322
recognize it any more. This makes the following significant changes: - The main body of the program doesn't know a thing about URIs, HTTP, or FTP. This makes it possible to easily plug in other protocols. (The next revision will probably be able to dynamically add new recognizers.) - There are no longer arbitrary timeouts for the protocols. If you want to set one for yourself, use the environment variables. - FTP proxies are now supported (if I implemented it right). - The HTTP implementation is much more complete, and can now do restarts, preserve modtimes, and mrun in mirror mode. It's not yet up to 1.1, but it's getting there. - Transaction TCP is now used for sending HTTP requests. The HTTP/1.1 syntax for requesting that the connection be closed after one request is implemented. In all of this, I have doubtless broken somebody. Please test it and tell me about the bugs.
OpenPOWER on IntegriCloud