]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libfetch/fetch.3
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libfetch / fetch.3
1 .\"-
2 .\" Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd January 26, 2010
29 .Dt FETCH 3
30 .Os
31 .Sh NAME
32 .Nm fetchMakeURL ,
33 .Nm fetchParseURL ,
34 .Nm fetchFreeURL ,
35 .Nm fetchXGetURL ,
36 .Nm fetchGetURL ,
37 .Nm fetchPutURL ,
38 .Nm fetchStatURL ,
39 .Nm fetchListURL ,
40 .Nm fetchXGet ,
41 .Nm fetchGet ,
42 .Nm fetchPut ,
43 .Nm fetchStat ,
44 .Nm fetchList ,
45 .Nm fetchXGetFile ,
46 .Nm fetchGetFile ,
47 .Nm fetchPutFile ,
48 .Nm fetchStatFile ,
49 .Nm fetchListFile ,
50 .Nm fetchXGetHTTP ,
51 .Nm fetchGetHTTP ,
52 .Nm fetchPutHTTP ,
53 .Nm fetchStatHTTP ,
54 .Nm fetchListHTTP ,
55 .Nm fetchXGetFTP ,
56 .Nm fetchGetFTP ,
57 .Nm fetchPutFTP ,
58 .Nm fetchStatFTP ,
59 .Nm fetchListFTP
60 .Nd file transfer functions
61 .Sh LIBRARY
62 .Lb libfetch
63 .Sh SYNOPSIS
64 .In sys/param.h
65 .In stdio.h
66 .In fetch.h
67 .Ft struct url *
68 .Fn fetchMakeURL "const char *scheme" "const char *host" "int port" "const char *doc" "const char *user" "const char *pwd"
69 .Ft struct url *
70 .Fn fetchParseURL "const char *URL"
71 .Ft void
72 .Fn fetchFreeURL "struct url *u"
73 .Ft FILE *
74 .Fn fetchXGetURL "const char *URL" "struct url_stat *us" "const char *flags"
75 .Ft FILE *
76 .Fn fetchGetURL "const char *URL" "const char *flags"
77 .Ft FILE *
78 .Fn fetchPutURL "const char *URL" "const char *flags"
79 .Ft int
80 .Fn fetchStatURL "const char *URL" "struct url_stat *us" "const char *flags"
81 .Ft struct url_ent *
82 .Fn fetchListURL "const char *URL" "const char *flags"
83 .Ft FILE *
84 .Fn fetchXGet "struct url *u" "struct url_stat *us" "const char *flags"
85 .Ft FILE *
86 .Fn fetchGet "struct url *u" "const char *flags"
87 .Ft FILE *
88 .Fn fetchPut "struct url *u" "const char *flags"
89 .Ft int
90 .Fn fetchStat "struct url *u" "struct url_stat *us" "const char *flags"
91 .Ft struct url_ent *
92 .Fn fetchList "struct url *u" "const char *flags"
93 .Ft FILE *
94 .Fn fetchXGetFile "struct url *u" "struct url_stat *us" "const char *flags"
95 .Ft FILE *
96 .Fn fetchGetFile "struct url *u" "const char *flags"
97 .Ft FILE *
98 .Fn fetchPutFile "struct url *u" "const char *flags"
99 .Ft int
100 .Fn fetchStatFile "struct url *u" "struct url_stat *us" "const char *flags"
101 .Ft struct url_ent *
102 .Fn fetchListFile "struct url *u" "const char *flags"
103 .Ft FILE *
104 .Fn fetchXGetHTTP "struct url *u" "struct url_stat *us" "const char *flags"
105 .Ft FILE *
106 .Fn fetchGetHTTP "struct url *u" "const char *flags"
107 .Ft FILE *
108 .Fn fetchPutHTTP "struct url *u" "const char *flags"
109 .Ft int
110 .Fn fetchStatHTTP "struct url *u" "struct url_stat *us" "const char *flags"
111 .Ft struct url_ent *
112 .Fn fetchListHTTP "struct url *u" "const char *flags"
113 .Ft FILE *
114 .Fn fetchXGetFTP "struct url *u" "struct url_stat *us" "const char *flags"
115 .Ft FILE *
116 .Fn fetchGetFTP "struct url *u" "const char *flags"
117 .Ft FILE *
118 .Fn fetchPutFTP "struct url *u" "const char *flags"
119 .Ft int
120 .Fn fetchStatFTP "struct url *u" "struct url_stat *us" "const char *flags"
121 .Ft struct url_ent *
122 .Fn fetchListFTP "struct url *u" "const char *flags"
123 .Sh DESCRIPTION
124 These functions implement a high-level library for retrieving and
125 uploading files using Uniform Resource Locators (URLs).
126 .Pp
127 .Fn fetchParseURL
128 takes a URL in the form of a null-terminated string and splits it into
129 its components function according to the Common Internet Scheme Syntax
130 detailed in RFC1738.
131 A regular expression which produces this syntax is:
132 .Bd -literal
133     <scheme>:(//(<user>(:<pwd>)?@)?<host>(:<port>)?)?/(<document>)?
134 .Ed
135 .Pp
136 If the URL does not seem to begin with a scheme name, the following
137 syntax is assumed:
138 .Bd -literal
139     ((<user>(:<pwd>)?@)?<host>(:<port>)?)?/(<document>)?
140 .Ed
141 .Pp
142 Note that some components of the URL are not necessarily relevant to
143 all URL schemes.
144 For instance, the file scheme only needs the <scheme> and <document>
145 components.
146 .Pp
147 .Fn fetchMakeURL
148 and
149 .Fn fetchParseURL
150 return a pointer to a
151 .Vt url
152 structure, which is defined as follows in
153 .In fetch.h :
154 .Bd -literal
155 #define URL_SCHEMELEN 16
156 #define URL_USERLEN 256
157 #define URL_PWDLEN 256
158
159 struct url {
160     char         scheme[URL_SCHEMELEN+1];
161     char         user[URL_USERLEN+1];
162     char         pwd[URL_PWDLEN+1];
163     char         host[MAXHOSTNAMELEN+1];
164     int          port;
165     char        *doc;
166     off_t        offset;
167     size_t       length;
168     time_t       ims_time;
169 };
170 .Ed
171 .Pp
172 The
173 .Va ims_time
174 field stores the time value for
175 .Li If-Modified-Since
176 HTTP requests.
177 .Pp
178 The pointer returned by
179 .Fn fetchMakeURL
180 or
181 .Fn fetchParseURL
182 should be freed using
183 .Fn fetchFreeURL .
184 .Pp
185 .Fn fetchXGetURL ,
186 .Fn fetchGetURL ,
187 and
188 .Fn fetchPutURL
189 constitute the recommended interface to the
190 .Nm fetch
191 library.
192 They examine the URL passed to them to determine the transfer
193 method, and call the appropriate lower-level functions to perform the
194 actual transfer.
195 .Fn fetchXGetURL
196 also returns the remote document's metadata in the
197 .Vt url_stat
198 structure pointed to by the
199 .Fa us
200 argument.
201 .Pp
202 The
203 .Fa flags
204 argument is a string of characters which specify transfer options.
205 The
206 meaning of the individual flags is scheme-dependent, and is detailed
207 in the appropriate section below.
208 .Pp
209 .Fn fetchStatURL
210 attempts to obtain the requested document's metadata and fill in the
211 structure pointed to by its second argument.
212 The
213 .Vt url_stat
214 structure is defined as follows in
215 .In fetch.h :
216 .Bd -literal
217 struct url_stat {
218     off_t        size;
219     time_t       atime;
220     time_t       mtime;
221 };
222 .Ed
223 .Pp
224 If the size could not be obtained from the server, the
225 .Fa size
226 field is set to -1.
227 If the modification time could not be obtained from the server, the
228 .Fa mtime
229 field is set to the epoch.
230 If the access time could not be obtained from the server, the
231 .Fa atime
232 field is set to the modification time.
233 .Pp
234 .Fn fetchListURL
235 attempts to list the contents of the directory pointed to by the URL
236 provided.
237 If successful, it returns a malloced array of
238 .Vt url_ent
239 structures.
240 The
241 .Vt url_ent
242 structure is defined as follows in
243 .In fetch.h :
244 .Bd -literal
245 struct url_ent {
246     char         name[PATH_MAX];
247     struct url_stat stat;
248 };
249 .Ed
250 .Pp
251 The list is terminated by an entry with an empty name.
252 .Pp
253 The pointer returned by
254 .Fn fetchListURL
255 should be freed using
256 .Fn free .
257 .Pp
258 .Fn fetchXGet ,
259 .Fn fetchGet ,
260 .Fn fetchPut
261 and
262 .Fn fetchStat
263 are similar to
264 .Fn fetchXGetURL ,
265 .Fn fetchGetURL ,
266 .Fn fetchPutURL
267 and
268 .Fn fetchStatURL ,
269 except that they expect a pre-parsed URL in the form of a pointer to
270 a
271 .Vt struct url
272 rather than a string.
273 .Pp
274 All of the
275 .Fn fetchXGetXXX ,
276 .Fn fetchGetXXX
277 and
278 .Fn fetchPutXXX
279 functions return a pointer to a stream which can be used to read or
280 write data from or to the requested document, respectively.
281 Note that
282 although the implementation details of the individual access methods
283 vary, it can generally be assumed that a stream returned by one of the
284 .Fn fetchXGetXXX
285 or
286 .Fn fetchGetXXX
287 functions is read-only, and that a stream returned by one of the
288 .Fn fetchPutXXX
289 functions is write-only.
290 .Sh FILE SCHEME
291 .Fn fetchXGetFile ,
292 .Fn fetchGetFile
293 and
294 .Fn fetchPutFile
295 provide access to documents which are files in a locally mounted file
296 system.
297 Only the <document> component of the URL is used.
298 .Pp
299 .Fn fetchXGetFile
300 and
301 .Fn fetchGetFile
302 do not accept any flags.
303 .Pp
304 .Fn fetchPutFile
305 accepts the
306 .Ql a
307 (append to file) flag.
308 If that flag is specified, the data written to
309 the stream returned by
310 .Fn fetchPutFile
311 will be appended to the previous contents of the file, instead of
312 replacing them.
313 .Sh FTP SCHEME
314 .Fn fetchXGetFTP ,
315 .Fn fetchGetFTP
316 and
317 .Fn fetchPutFTP
318 implement the FTP protocol as described in RFC959.
319 .Pp
320 If the
321 .Ql p
322 (passive) flag is specified, a passive (rather than active) connection
323 will be attempted.
324 .Pp
325 If the
326 .Ql l
327 (low) flag is specified, data sockets will be allocated in the low (or
328 default) port range instead of the high port range (see
329 .Xr ip 4 ) .
330 .Pp
331 If the
332 .Ql d
333 (direct) flag is specified,
334 .Fn fetchXGetFTP ,
335 .Fn fetchGetFTP
336 and
337 .Fn fetchPutFTP
338 will use a direct connection even if a proxy server is defined.
339 .Pp
340 If no user name or password is given, the
341 .Nm fetch
342 library will attempt an anonymous login, with user name "anonymous"
343 and password "anonymous@<hostname>".
344 .Sh HTTP SCHEME
345 The
346 .Fn fetchXGetHTTP ,
347 .Fn fetchGetHTTP
348 and
349 .Fn fetchPutHTTP
350 functions implement the HTTP/1.1 protocol.
351 With a little luck, there is
352 even a chance that they comply with RFC2616 and RFC2617.
353 .Pp
354 If the
355 .Ql d
356 (direct) flag is specified,
357 .Fn fetchXGetHTTP ,
358 .Fn fetchGetHTTP
359 and
360 .Fn fetchPutHTTP
361 will use a direct connection even if a proxy server is defined.
362 .Pp
363 If the
364 .Ql i
365 (if-modified-since) flag is specified, and
366 the
367 .Va ims_time
368 field is set in 
369 .Vt "struct url" ,
370 then
371 .Fn fetchXGetHTTP
372 and
373 .Fn fetchGetHTTP
374 will send a conditional
375 .Li If-Modified-Since
376 HTTP header to only fetch the content if it is newer than
377 .Va ims_time .
378 .Pp
379 Since there seems to be no good way of implementing the HTTP PUT
380 method in a manner consistent with the rest of the
381 .Nm fetch
382 library,
383 .Fn fetchPutHTTP
384 is currently unimplemented.
385 .Sh AUTHENTICATION
386 Apart from setting the appropriate environment variables and
387 specifying the user name and password in the URL or the
388 .Vt struct url ,
389 the calling program has the option of defining an authentication
390 function with the following prototype:
391 .Pp
392 .Ft int
393 .Fn myAuthMethod "struct url *u"
394 .Pp
395 The callback function should fill in the
396 .Fa user
397 and
398 .Fa pwd
399 fields in the provided
400 .Vt struct url
401 and return 0 on success, or any other value to indicate failure.
402 .Pp
403 To register the authentication callback, simply set
404 .Va fetchAuthMethod
405 to point at it.
406 The callback will be used whenever a site requires authentication and
407 the appropriate environment variables are not set.
408 .Pp
409 This interface is experimental and may be subject to change.
410 .Sh RETURN VALUES
411 .Fn fetchParseURL
412 returns a pointer to a
413 .Vt struct url
414 containing the individual components of the URL.
415 If it is
416 unable to allocate memory, or the URL is syntactically incorrect,
417 .Fn fetchParseURL
418 returns a NULL pointer.
419 .Pp
420 The
421 .Fn fetchStat
422 functions return 0 on success and -1 on failure.
423 .Pp
424 All other functions return a stream pointer which may be used to
425 access the requested document, or NULL if an error occurred.
426 .Pp
427 The following error codes are defined in
428 .In fetch.h :
429 .Bl -tag -width 18n
430 .It Bq Er FETCH_ABORT
431 Operation aborted
432 .It Bq Er FETCH_AUTH
433 Authentication failed
434 .It Bq Er FETCH_DOWN
435 Service unavailable
436 .It Bq Er FETCH_EXISTS
437 File exists
438 .It Bq Er FETCH_FULL
439 File system full
440 .It Bq Er FETCH_INFO
441 Informational response
442 .It Bq Er FETCH_MEMORY
443 Insufficient memory
444 .It Bq Er FETCH_MOVED
445 File has moved
446 .It Bq Er FETCH_NETWORK
447 Network error
448 .It Bq Er FETCH_OK
449 No error
450 .It Bq Er FETCH_PROTO
451 Protocol error
452 .It Bq Er FETCH_RESOLV
453 Resolver error
454 .It Bq Er FETCH_SERVER
455 Server error
456 .It Bq Er FETCH_TEMP
457 Temporary error
458 .It Bq Er FETCH_TIMEOUT
459 Operation timed out
460 .It Bq Er FETCH_UNAVAIL
461 File is not available
462 .It Bq Er FETCH_UNKNOWN
463 Unknown error
464 .It Bq Er FETCH_URL
465 Invalid URL
466 .El
467 .Pp
468 The accompanying error message includes a protocol-specific error code
469 and message, e.g.\& "File is not available (404 Not Found)"
470 .Sh ENVIRONMENT
471 .Bl -tag -width ".Ev FETCH_BIND_ADDRESS"
472 .It Ev FETCH_BIND_ADDRESS
473 Specifies a hostname or IP address to which sockets used for outgoing
474 connections will be bound.
475 .It Ev FTP_LOGIN
476 Default FTP login if none was provided in the URL.
477 .It Ev FTP_PASSIVE_MODE
478 If set to anything but
479 .Ql no ,
480 forces the FTP code to use passive mode.
481 .It Ev FTP_PASSWORD
482 Default FTP password if the remote server requests one and none was
483 provided in the URL.
484 .It Ev FTP_PROXY
485 URL of the proxy to use for FTP requests.
486 The document part is ignored.
487 FTP and HTTP proxies are supported; if no scheme is specified, FTP is
488 assumed.
489 If the proxy is an FTP proxy,
490 .Nm libfetch
491 will send
492 .Ql user@host
493 as user name to the proxy, where
494 .Ql user
495 is the real user name, and
496 .Ql host
497 is the name of the FTP server.
498 .Pp
499 If this variable is set to an empty string, no proxy will be used for
500 FTP requests, even if the
501 .Ev HTTP_PROXY
502 variable is set.
503 .It Ev ftp_proxy
504 Same as
505 .Ev FTP_PROXY ,
506 for compatibility.
507 .It Ev HTTP_AUTH
508 Specifies HTTP authorization parameters as a colon-separated list of
509 items.
510 The first and second item are the authorization scheme and realm
511 respectively; further items are scheme-dependent.
512 Currently, the
513 .Dq basic
514 and
515 .Dq digest
516 authorization methods are supported.
517 .Pp
518 Both methods require two parameters: the user name and
519 password, in that order.
520 .Pp
521 This variable is only used if the server requires authorization and
522 no user name or password was specified in the URL.
523 .It Ev HTTP_PROXY
524 URL of the proxy to use for HTTP requests.
525 The document part is ignored.
526 Only HTTP proxies are supported for HTTP requests.
527 If no port number is specified, the default is 3128.
528 .Pp
529 Note that this proxy will also be used for FTP documents, unless the
530 .Ev FTP_PROXY
531 variable is set.
532 .It Ev http_proxy
533 Same as
534 .Ev HTTP_PROXY ,
535 for compatibility.
536 .It Ev HTTP_PROXY_AUTH
537 Specifies authorization parameters for the HTTP proxy in the same
538 format as the
539 .Ev HTTP_AUTH
540 variable.
541 .Pp
542 This variable is used if and only if connected to an HTTP proxy, and
543 is ignored if a user and/or a password were specified in the proxy
544 URL.
545 .It Ev HTTP_REFERER
546 Specifies the referrer URL to use for HTTP requests.
547 If set to
548 .Dq auto ,
549 the document URL will be used as referrer URL.
550 .It Ev HTTP_USER_AGENT
551 Specifies the User-Agent string to use for HTTP requests.
552 This can be useful when working with HTTP origin or proxy servers that
553 differentiate between user agents.
554 .It Ev NETRC
555 Specifies a file to use instead of
556 .Pa ~/.netrc
557 to look up login names and passwords for FTP sites.
558 See
559 .Xr ftp 1
560 for a description of the file format.
561 This feature is experimental.
562 .It Ev NO_PROXY
563 Either a single asterisk, which disables the use of proxies
564 altogether, or a comma- or whitespace-separated list of hosts for
565 which proxies should not be used.
566 .It Ev no_proxy
567 Same as
568 .Ev NO_PROXY ,
569 for compatibility.
570 .El
571 .Sh EXAMPLES
572 To access a proxy server on
573 .Pa proxy.example.com
574 port 8080, set the
575 .Ev HTTP_PROXY
576 environment variable in a manner similar to this:
577 .Pp
578 .Dl HTTP_PROXY=http://proxy.example.com:8080
579 .Pp
580 If the proxy server requires authentication, there are
581 two options available for passing the authentication data.
582 The first method is by using the proxy URL:
583 .Pp
584 .Dl HTTP_PROXY=http://<user>:<pwd>@proxy.example.com:8080
585 .Pp
586 The second method is by using the
587 .Ev HTTP_PROXY_AUTH
588 environment variable:
589 .Bd -literal -offset indent
590 HTTP_PROXY=http://proxy.example.com:8080
591 HTTP_PROXY_AUTH=basic:*:<user>:<pwd>
592 .Ed
593 .Pp
594 To disable the use of a proxy for an HTTP server running on the local
595 host, define
596 .Ev NO_PROXY
597 as follows:
598 .Bd -literal -offset indent
599 NO_PROXY=localhost,127.0.0.1
600 .Ed
601 .Sh SEE ALSO
602 .Xr fetch 1 ,
603 .Xr ftpio 3 ,
604 .Xr ip 4
605 .Rs
606 .%A J. Postel
607 .%A J. K. Reynolds
608 .%D October 1985
609 .%B File Transfer Protocol
610 .%O RFC959
611 .Re
612 .Rs
613 .%A P. Deutsch
614 .%A A. Emtage
615 .%A A. Marine.
616 .%D May 1994
617 .%T How to Use Anonymous FTP
618 .%O RFC1635
619 .Re
620 .Rs
621 .%A T. Berners-Lee
622 .%A L. Masinter
623 .%A M. McCahill
624 .%D December 1994
625 .%T Uniform Resource Locators (URL)
626 .%O RFC1738
627 .Re
628 .Rs
629 .%A R. Fielding
630 .%A J. Gettys
631 .%A J. Mogul
632 .%A H. Frystyk
633 .%A L. Masinter
634 .%A P. Leach
635 .%A T. Berners-Lee
636 .%D January 1999
637 .%B Hypertext Transfer Protocol -- HTTP/1.1
638 .%O RFC2616
639 .Re
640 .Rs
641 .%A J. Franks
642 .%A P. Hallam-Baker
643 .%A J. Hostetler
644 .%A S. Lawrence
645 .%A P. Leach
646 .%A A. Luotonen
647 .%A L. Stewart
648 .%D June 1999
649 .%B HTTP Authentication: Basic and Digest Access Authentication
650 .%O RFC2617
651 .Re
652 .Sh HISTORY
653 The
654 .Nm fetch
655 library first appeared in
656 .Fx 3.0 .
657 .Sh AUTHORS
658 .An -nosplit
659 The
660 .Nm fetch
661 library was mostly written by
662 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
663 with numerous suggestions and contributions from
664 .An Jordan K. Hubbard Aq jkh@FreeBSD.org ,
665 .An Eugene Skepner Aq eu@qub.com ,
666 .An Hajimu Umemoto Aq ume@FreeBSD.org ,
667 .An Henry Whincup Aq henry@techiebod.com ,
668 .An Jukka A. Ukkonen Aq jau@iki.fi ,
669 .An Jean-Fran\(,cois Dockes Aq jf@dockes.org
670 and others.
671 It replaces the older
672 .Nm ftpio
673 library written by
674 .An Poul-Henning Kamp Aq phk@FreeBSD.org
675 and
676 .An Jordan K. Hubbard Aq jkh@FreeBSD.org .
677 .Pp
678 This manual page was written by
679 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
680 .Sh BUGS
681 Some parts of the library are not yet implemented.
682 The most notable
683 examples of this are
684 .Fn fetchPutHTTP ,
685 .Fn fetchListHTTP ,
686 .Fn fetchListFTP
687 and FTP proxy support.
688 .Pp
689 There is no way to select a proxy at run-time other than setting the
690 .Ev HTTP_PROXY
691 or
692 .Ev FTP_PROXY
693 environment variables as appropriate.
694 .Pp
695 .Nm libfetch
696 does not understand or obey 305 (Use Proxy) replies.
697 .Pp
698 Error numbers are unique only within a certain context; the error
699 codes used for FTP and HTTP overlap, as do those used for resolver and
700 system errors.
701 For instance, error code 202 means "Command not
702 implemented, superfluous at this site" in an FTP context and
703 "Accepted" in an HTTP context.
704 .Pp
705 .Fn fetchStatFTP
706 does not check that the result of an MDTM command is a valid date.
707 .Pp
708 The man page is incomplete, poorly written and produces badly
709 formatted text.
710 .Pp
711 The error reporting mechanism is unsatisfactory.
712 .Pp
713 Some parts of the code are not fully reentrant.