Date: Sun, 9 Sep 2012 21:19:43 +0000 (UTC) From: Steve Wills <swills@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r303998 - in head/www/http_get: . files Message-ID: <201209092119.q89LJhKW039454@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: swills Date: Sun Sep 9 21:19:43 2012 New Revision: 303998 URL: http://svn.freebsd.org/changeset/ports/303998 Log: - Add https/ssl support - Update to 20100619 (latest) - Give maintainership to Masaki TAGAWA <masaki@club.kyutech.ac.jp> PR: ports/171491 Submitted by: Masaki TAGAWA <masaki@club.kyutech.ac.jp> Added: head/www/http_get/files/Makefile.bsd (contents, props changed) Modified: head/www/http_get/Makefile (contents, props changed) head/www/http_get/distinfo (contents, props changed) head/www/http_get/files/patch-http_get.c (contents, props changed) Modified: head/www/http_get/Makefile ============================================================================== --- head/www/http_get/Makefile Sun Sep 9 21:12:47 2012 (r303997) +++ head/www/http_get/Makefile Sun Sep 9 21:19:43 2012 (r303998) @@ -6,19 +6,23 @@ # PORTNAME= http_get -PORTVERSION= 1.0 -PORTREVISION= 1 +PORTVERSION= 1.0.20100619 CATEGORIES= www ipv6 MASTER_SITES= http://www.acme.com/software/http_get/ -DISTNAME= ${PORTNAME}_18mar2002 +DISTNAME= ${PORTNAME}_19jun2010 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= masaki@club.kyutech.ac.jp COMMENT= Dump http-contents to stdout WRKSRC= ${WRKDIR}/http_get +MAKEFILE= ${FILESDIR}/Makefile.bsd MAN1= http_get.1 -MANCOMPRESSED= no +MANCOMPRESSED= yes PLIST_FILES= bin/http_get +.ifndef NO_OPENSSL +USE_OPENSSL= yes +.endif + .include <bsd.port.mk> Modified: head/www/http_get/distinfo ============================================================================== --- head/www/http_get/distinfo Sun Sep 9 21:12:47 2012 (r303997) +++ head/www/http_get/distinfo Sun Sep 9 21:19:43 2012 (r303998) @@ -1,2 +1,2 @@ -SHA256 (http_get_18mar2002.tar.gz) = 0cc841593596c86842a0f18143ef81fb4876e0c2fbef92e9c2687b75f0bc9dd3 -SIZE (http_get_18mar2002.tar.gz) = 6481 +SHA256 (http_get_19jun2010.tar.gz) = 8c5c58c9c2710cbb6d225b9ddf9301a894d2069a2a4852d3a1a1df8d4a7f4c6a +SIZE (http_get_19jun2010.tar.gz) = 6646 Added: head/www/http_get/files/Makefile.bsd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/http_get/files/Makefile.bsd Sun Sep 9 21:19:43 2012 (r303998) @@ -0,0 +1,12 @@ +PROG = http_get +SRCS = http_get.c + +.ifndef NO_OPENSSL +CFLAGS += -DUSE_SSL -I${OPENSSLBASE}/include ${OPENSSL_CFLAGS} +LDFLAGS += -L${OPENSSLBASE}/lib -lssl -lcrypto +.endif + +BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/man/man + +.include <bsd.prog.mk> Modified: head/www/http_get/files/patch-http_get.c ============================================================================== --- head/www/http_get/files/patch-http_get.c Sun Sep 9 21:12:47 2012 (r303997) +++ head/www/http_get/files/patch-http_get.c Sun Sep 9 21:19:43 2012 (r303998) @@ -1,9 +1,9 @@ ---- http_get.c.orig Wed Dec 15 19:10:11 2004 -+++ http_get.c Wed Dec 15 19:10:30 2004 +--- http_get.c.org 2010-06-20 11:20:30.000000000 +0900 ++++ http_get.c 2012-09-09 11:24:00.000000000 +0900 @@ -2,7 +2,9 @@ ** ** Originally based on a simple version by Al Globus <globus@nas.nasa.gov>. - ** Debugged and prettified by Jef Poskanzer <jef@acme.com>. Also includes + ** Debugged and prettified by Jef Poskanzer <jef@mail.acme.com>. Also includes -** ifdefs to handle https via OpenSSL. +** ifdefs to handle https via OpenSSL. -h argument for debugging multihomed +** URLs added by Jim Salter. @@ -11,7 +11,7 @@ */ #include <unistd.h> -@@ -35,6 +37,7 @@ +@@ -36,6 +38,7 @@ static int verbose; static int timeout; static char* url; @@ -19,51 +19,48 @@ /* Protocol symbols. */ #define PROTO_HTTP 0 -@@ -72,6 +75,8 @@ - user_agent = "http_get"; - auth_token = (char*) 0; - cookie = (char*) 0; +@@ -79,6 +82,7 @@ + ncookies = 0; + header_name = (char*) 0; + header_value = (char*) 0; + force_host = (char*) "[NONE]"; -+ + verbose = 0; while ( argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0' ) { - if ( strcmp( argv[argn], "-v" ) == 0 ) -@@ -81,6 +86,11 @@ +@@ -87,6 +91,11 @@ ++argn; timeout = atoi( argv[argn] ); } -+ else if ( strcmp( argv[argn], "-h" ) == 0 && argn + 1 < argc ) -+ { -+ ++argn; -+ force_host = argv[argn]; -+ } ++ else if ( strcmp( argv[argn], "-H" ) == 0 && argn + 1 < argc ) ++ { ++ ++argn; ++ force_host = argv[argn]; ++ } else if ( strcmp( argv[argn], "-r" ) == 0 && argn + 1 < argc ) { ++argn; -@@ -127,7 +137,7 @@ +@@ -147,7 +156,7 @@ static void usage() { -- (void) fprintf( stderr, "usage: %s [-t timeout] [-r referer] [-u user-agent] [-a username:password] url\n", argv0 ); -+ (void) fprintf( stderr, "usage: %s [-t timeout] [-h force host address] [-r referer] [-u user-agent] [-a username:password] url\n", argv0 ); +- (void) fprintf( stderr, "usage: %s [-c cookie] [-t timeout] [-r referer] [-u user-agent] [-a username:password] [-h header value] [-v] url\n", argv0 ); ++ (void) fprintf( stderr, "usage: %s [-c cookie] [-t timeout] [-H force host address] [-r referer] [-u user-agent] [-a username:password] [-h header value] [-v] url\n", argv0 ); exit( 1 ); } -@@ -218,7 +228,16 @@ - int bytes, b, header_state, status; +@@ -240,7 +249,14 @@ + int i, bytes, b, header_state, status; (void) alarm( timeout ); - sockfd = open_client_socket( host, port ); -+ -+if ( force_host == "[NONE]" ) -+ { ++ if ( strcmp( force_host, "[NONE]" ) == 0 ) ++ { + sockfd = open_client_socket( host, port ); -+ } -+else -+ { ++ } ++ else ++ { + sockfd = open_client_socket( force_host, port ); -+ } -+ ++ } #ifdef USE_SSL if ( protocol == PROTO_HTTPS )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209092119.q89LJhKW039454>