Update to version 1.0.20140814

PR:		196782
Submitted by:	Neel Chauhan <neel@neelc.org>
Approved by:	maintainer timeout
This commit is contained in:
Pawel Pekala 2015-02-05 21:12:20 +00:00
parent 304821c785
commit f953a1e049
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=378491
3 changed files with 4 additions and 70 deletions

View File

@ -2,10 +2,10 @@
# $FreeBSD$
PORTNAME= http_get
PORTVERSION= 1.0.20100619
PORTVERSION= 1.0.20140814
CATEGORIES= www ipv6
MASTER_SITES= http://www.acme.com/software/http_get/
DISTNAME= ${PORTNAME}_19jun2010
DISTNAME= ${PORTNAME}_14Aug2014
MAINTAINER= masaki@club.kyutech.ac.jp
COMMENT= Dump http-contents to stdout

View File

@ -1,2 +1,2 @@
SHA256 (http_get_19jun2010.tar.gz) = 8c5c58c9c2710cbb6d225b9ddf9301a894d2069a2a4852d3a1a1df8d4a7f4c6a
SIZE (http_get_19jun2010.tar.gz) = 6646
SHA256 (http_get_14Aug2014.tar.gz) = b176def3fc2a44b6e20712fa1094f3ad49ccbd7f9807070e7794ed538ca72539
SIZE (http_get_14Aug2014.tar.gz) = 6789

View File

@ -1,66 +0,0 @@
--- 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@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.
+**
*/
#include <unistd.h>
@@ -36,6 +38,7 @@
static int verbose;
static int timeout;
static char* url;
+static char* force_host;
/* Protocol symbols. */
#define PROTO_HTTP 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' )
{
@@ -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], "-r" ) == 0 && argn + 1 < argc )
{
++argn;
@@ -147,7 +156,7 @@
static void
usage()
{
- (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 );
}
@@ -240,7 +249,14 @@
int i, bytes, b, header_state, status;
(void) alarm( timeout );
- sockfd = open_client_socket( host, port );
+ if ( strcmp( force_host, "[NONE]" ) == 0 )
+ {
+ sockfd = open_client_socket( host, port );
+ }
+ else
+ {
+ sockfd = open_client_socket( force_host, port );
+ }
#ifdef USE_SSL
if ( protocol == PROTO_HTTPS )