David Shaw
6c3a76cca0
Part of issue 1447: Pass proper Host header when SRV is used.
...
* common/http.c (send_request, connect_server): Set proper Host header
(no :port, host is that of the SRV) when SRV is used in the
curl-shim.
Backported from cbe98b2cb1e40ba253300e604996681ae191e363
2012-12-19 11:43:28 -05:00
Werner Koch
3d56d486e1
Remove trailing white space from some files
...
--
2012-12-19 14:05:56 +01:00
Werner Koch
550983f8fb
Adjust to GNU coding standards
...
--
A variable definition with initialization shall have only one variable
per type.
2012-12-19 14:03:25 +01:00
Werner Koch
58004340cc
Fix last commit
...
* util/http.c (connect_server): Bump SRVINDEX and not SRV.
2012-12-19 13:57:29 +01:00
David Shaw
f2f12f41ef
Fix issue 1446: honor ports given in SRV responses.
...
* common/http.c (send_request, connect_server, http_open): Use a
struct srv instead of a single srvtag so we can pass the chosen host
and port back to the caller.
(connect_server): Use the proper port in the HAVE_GETADDRINFO case.
* keyserver/curl-shim.c (curl_easy_perform): Use struct srv and log
chosen host and port.
* keyserver/gpgkeys_hkp.c (main): Properly take the port given by SRV.
Backported from ba9e974f1fd85b3dbbfb5e26d7a14f71d07c7cf2
2012-12-18 21:58:53 -05:00
David Shaw
e8436d575e
Avoid caches to get the most recent copy of the key. This is bug
...
#1061
2009-05-26 14:15:56 +00:00
David Shaw
2933e3d094
* srv.h: Move to include/srv.h.
...
* http.c (send_request): Pass in srvtag... (http_open): ...from here.
2009-04-06 03:18:07 +00:00
David Shaw
a929f4c78e
* curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add
...
a CURLOPT_SRVTAG_GPG_HACK (passed through the the http engine).
* http.h: Allow passing srvtag to http_open and http_open_document.
* http.c (http_open, http_open_document): Allow passing srvtag to
http_open and http_open_document.
2009-04-03 03:59:07 +00:00
David Shaw
a5b708ba9c
* http.c (connect_server): free (rather than xfree) the result of
...
getsrv().
2009-04-03 03:38:59 +00:00
David Shaw
f801e0f9a8
* http.c (do_parse_uri): Properly handle IPv6 literal addresses as per
...
RFC-2732. Adapted from patch by Phil Pennock.
2009-03-13 17:51:05 +00:00
David Shaw
81723b397a
* Makefile.am, http.c (start_server): Minor tweaks to get http-test
...
compiling again.
2009-03-13 17:27:35 +00:00
Werner Koch
9a2a818887
Switched to GPLv3.
...
Updated gettext.
2007-10-23 10:48:09 +00:00
David Shaw
f6e12f4b46
* http.c (do_parse_uri): Remove the hkp port 11371 detection. We
...
implement hkp in the keyserver handler, and the support here makes it
appear like a bad hkp request actually succeeded.
2007-02-11 03:10:12 +00:00
Werner Koch
60044dd11b
Fix bug#739 (proxy/shutdown)
2006-12-14 09:55:32 +00:00
David Shaw
4fbf91ad9e
* http.c (send_request): A zero-length proxy is the same as no proxy at
...
all. Suggested by J. Scott Berg.
2006-07-20 22:26:29 +00:00
David Shaw
ca6c57bc8a
* http.c (send_request): A zero length proxy is the same as no proxy.
2006-02-19 21:03:01 +00:00
Werner Koch
a1cdf3c75f
Converted all m_free to xfree etc.
2005-07-27 18:10:56 +00:00
David Shaw
c5a94d29ce
* http.c (make_radix64_string): Add '=' padding as per standard.
...
(send_request, http_open, http_open_document): Clean up auth code.
Can now support different auth for a proxy and the file being
requested via that proxy. Unescape auth strings.
2005-06-23 04:23:37 +00:00
David Shaw
c8d1036b26
* http.c (send_request, http_open, http_open_document): Pass in auth
...
and proxyauth that can override the in-url auth.
2005-06-22 04:12:40 +00:00
David Shaw
b967d27173
* http.c (send_request): Need == after the radix64-encoded basic auth
...
string.
2005-06-22 03:20:43 +00:00
Werner Koch
7d4043ca57
Updated FSF street address and preparations for a release candidate.
2005-05-31 08:39:18 +00:00
Werner Koch
57ec15c0bb
Last changes for W32
2005-02-03 11:16:27 +00:00
David Shaw
f7a0254e63
* http.c (connect_server): Fix fd leak when connecting to a round-robin
...
server set that has some down servers. Noted by Phil Pennock.
2005-02-01 20:55:35 +00:00
David Shaw
522fd5bc82
* http.c (connect_server): Use INADDR_NONE instead of SOCKET_ERROR.
...
Noted by Timo.
2005-01-13 22:09:33 +00:00
David Shaw
f539f3d2b2
Better implementation for the SRV check. We don't need to actually check
...
all the header files individually since the SRV test compile uses them
together.
2004-12-29 00:58:05 +00:00
David Shaw
9cc9a79047
* http.c (send_request): Include the port if non-80 in the Host: header.
...
Noted by Jason Harris.
2004-12-03 20:23:12 +00:00
David Shaw
83d3914317
* http.c (connect_server, send_request): Use the URI scheme as the SRV tag
...
rather than hard-coding _hkp.
2004-10-18 15:51:43 +00:00
David Shaw
4d79b138ac
* http.c (connect_server): [_WIN32] actually fill in the sin_addr so we
...
aren't always talking to localhost. Add some general sanity checking of
parameters learned from gethostbyname().
2004-10-16 21:31:36 +00:00
David Shaw
440e9a9979
* http.c (make_radix64_string, do_parse_uri, send_request): Add basic auth
...
for proxies and direct requests. Suggested by Florent Thoumie.
2004-09-10 21:16:47 +00:00
David Shaw
5494eb1bb6
* http.c (main): Fix test code for http-test.
2004-09-10 18:56:52 +00:00
David Shaw
b9167cb0d8
* http.c (insert_escapes): Fix encoding problem for non-URI-safe
...
characters. Noted by Vladimir Novak.
2004-08-19 21:19:37 +00:00
David Shaw
eea75c0234
* http.c (send_request, http_open_document, http_open): Pass the http
...
proxy from outside rather than pulling it from the evironment.
2003-12-28 15:55:53 +00:00
David Shaw
acdcbd6550
* http.c (send_request): Add a Host: header for virtual hosts.
2003-12-06 18:35:32 +00:00
David Shaw
9a69b07bd7
* http.c (connect_server): Differentiate between generic "can't connect"
...
errors and the more specific "host not found". Suggested by Samuel
Tardieu.
2003-11-01 14:27:10 +00:00
Timo Schulz
046493fce9
2003-09-21 Timo Schulz <twoaday@freakmail.de>
...
* http.c [WIN32]: Define MB_CUR_MAX.
(connect_server): use unsigned long since W32 does not have in_addr_t.
2003-09-21 17:36:51 +00:00
David Shaw
cd06705184
* dotlock.c, http.c, iobuf.c, simple-gettext.c, srv.c, srv.h, strgutil.c,
...
ttyio.c, w32reg.c: s/__MINGW32__/_WIN32/ to help building on native
Windows compilers. Requested by Brian Gladman. From Werner on stable
branch.
* http.c (connect_server): Oops - forgot to freeaddrinfo().
2003-08-28 23:29:32 +00:00
David Shaw
68c898372b
* http.c (connect_server): Try and use getaddrinfo if it is available.
...
Try for IPv6 via getaddrinfo() or a IPv6-ized gethostbyname(). Suggested
by Jun-ichiro itojun Hagino.
2003-08-25 02:18:45 +00:00
David Shaw
c84fdfbe62
* argparse.c, dotlock.c, fileutil.c, iobuf.c, miscutil.c,
...
simple-gettext.c, errors.c, http.c, memory.c, secmem.c, ttyio.c: Edit all
preprocessor instructions to remove whitespace before the '#'. This is
not required by C89, but there are some compilers out there that don't
like it.
2003-05-24 16:53:14 +00:00
David Shaw
81844d2b65
* http.c (connect_server): Use DNS SRV to get a server list. Fail over to
...
A records if necessary.
* Makefile.am, srv.h, srv.c: New DNS SRV handling code.
2003-03-11 22:04:53 +00:00
David Shaw
9d32f6f06b
* http.c (connect_server): Try all A records for names with multiple
...
addresses until one answers for both MINGW32 and not MINGW32.
2002-10-17 12:45:58 +00:00
David Shaw
4849c0ab7b
* http.c (connect_server): Properly handle a single A record that fails
...
connect().
2002-10-11 02:24:59 +00:00
David Shaw
c5faf2270a
* http.c (connect_server): Try all A records for names with multiple
...
addresses until one answers (not MINGW32).
2002-09-24 21:06:20 +00:00
David Shaw
3f51f7db3d
Update head to match stable 1.0
2002-06-29 13:46:34 +00:00
Werner Koch
92cd255508
See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner Koch
2000-07-14 17:34:53 +00:00
Werner Koch
baa30ad117
See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner Koch
2000-01-27 16:50:45 +00:00
Werner Koch
0070faa0ff
See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner Koch
2000-01-24 11:55:49 +00:00
Werner Koch
c7447e78e2
See ChangeLog: Sun May 23 14:20:22 CEST 1999 Werner Koch
1999-05-23 12:29:05 +00:00
Werner Koch
1feae2011c
See ChangeLog: Sun Apr 18 10:11:28 CEST 1999 Werner Koch
1999-04-18 08:18:52 +00:00
Werner Koch
fb8dbdbd95
See ChangeLog: Sat Mar 20 11:53:40 CET 1999 Werner Koch
1999-03-20 10:53:39 +00:00
Werner Koch
e1a1b3fc90
See ChangeLog: Tue Feb 16 14:10:02 CET 1999 Werner Koch
1999-02-16 13:16:33 +00:00