You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
359 lines
19 KiB
359 lines
19 KiB
From 77ed36a0e1f604957054a2c25b6556acbd1c9f29 Mon Sep 17 00:00:00 2001 |
|
From: Daniel Stenberg <daniel@haxx.se> |
|
Date: Thu, 25 Dec 2014 23:55:03 +0100 |
|
Subject: [PATCH 1/2] url-parsing: reject CRLFs within URLs |
|
|
|
Bug: http://curl.haxx.se/docs/adv_20150108B.html |
|
Reported-by: Andrey Labunets |
|
|
|
Upstream-commit: 178bd7db34f77e020fb8562890c5625ccbd67093 |
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com> |
|
--- |
|
lib/url.c | 7 +++++++ |
|
1 file changed, 7 insertions(+) |
|
|
|
diff --git a/lib/url.c b/lib/url.c |
|
index 0aa5a33..736d5d9 100644 |
|
--- a/lib/url.c |
|
+++ b/lib/url.c |
|
@@ -3599,6 +3599,13 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, |
|
|
|
*prot_missing = FALSE; |
|
|
|
+ /* We might pass the entire URL into the request so we need to make sure |
|
+ * there are no bad characters in there.*/ |
|
+ if(strpbrk(data->change.url, "\r\n")) { |
|
+ failf(data, "Illegal characters found in URL"); |
|
+ return CURLE_URL_MALFORMAT; |
|
+ } |
|
+ |
|
/************************************************************* |
|
* Parse the URL. |
|
* |
|
-- |
|
2.1.0 |
|
|
|
|
|
From 916b5628b33bbc8bcad0f4b491089ba555c3dac6 Mon Sep 17 00:00:00 2001 |
|
From: Daniel Stenberg <daniel@haxx.se> |
|
Date: Thu, 25 Dec 2014 23:51:43 +0100 |
|
Subject: [PATCH 2/2] tests: make sure CRLFs can't be used in URLs passed to |
|
proxy |
|
|
|
Bug: http://curl.haxx.se/docs/adv_20150108B.html |
|
|
|
Upstream-commit: 3df8e78860d3a3d3cf95252bd2b4ad5fd53360cd |
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com> |
|
--- |
|
tests/data/Makefile.am | 2 +- |
|
tests/data/Makefile.in | 2 +- |
|
tests/data/test1529 | 43 ++++++++++++++++++++++++++ |
|
tests/libtest/Makefile.in | 77 +++++++++++++++++++++++++++++++++++++++++++++- |
|
tests/libtest/Makefile.inc | 7 ++++- |
|
tests/libtest/lib1529.c | 59 +++++++++++++++++++++++++++++++++++ |
|
6 files changed, 186 insertions(+), 4 deletions(-) |
|
create mode 100644 tests/data/test1529 |
|
create mode 100644 tests/libtest/lib1529.c |
|
|
|
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am |
|
index 0a767b3..0bb8ffd 100644 |
|
--- a/tests/data/Makefile.am |
|
+++ b/tests/data/Makefile.am |
|
@@ -94,7 +94,7 @@ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \ |
|
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ |
|
test1408 test1409 test1410 test1411 test1412 test1413 test1415 \ |
|
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ |
|
-test1508 \ |
|
+test1508 test1529 \ |
|
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ |
|
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ |
|
test2016 test2017 test2018 test2019 test2020 test2021 test2022 \ |
|
diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in |
|
index 2256422..e73ca96 100644 |
|
--- a/tests/data/Makefile.in |
|
+++ b/tests/data/Makefile.in |
|
@@ -358,7 +358,7 @@ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \ |
|
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ |
|
test1408 test1409 test1410 test1411 test1412 test1413 test1415 \ |
|
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ |
|
-test1508 \ |
|
+test1508 test1529 \ |
|
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ |
|
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ |
|
test2016 test2017 test2018 test2019 test2020 test2021 test2022 \ |
|
diff --git a/tests/data/test1529 b/tests/data/test1529 |
|
new file mode 100644 |
|
index 0000000..33df268 |
|
--- /dev/null |
|
+++ b/tests/data/test1529 |
|
@@ -0,0 +1,43 @@ |
|
+<testcase> |
|
+<info> |
|
+<keywords> |
|
+HTTP |
|
+HTTP GET |
|
+HTTP proxy |
|
+</keywords> |
|
+</info> |
|
+ |
|
+# Server-side |
|
+<reply> |
|
+<connect> |
|
+HTTP/1.1 200 OK |
|
+We-are: good |
|
+ |
|
+</connect> |
|
+ |
|
+</reply> |
|
+# Client-side |
|
+<client> |
|
+<server> |
|
+http |
|
+http-proxy |
|
+</server> |
|
+<tool> |
|
+lib1529 |
|
+</tool> |
|
+ <name> |
|
+HTTP request-injection in URL sent over proxy |
|
+ </name> |
|
+ <command> |
|
+ "http://the.old.moo:%HTTPPORT/1529" %HOSTIP:%PROXYPORT |
|
+</command> |
|
+</client> |
|
+ |
|
+# it should be detected and an error should be reported |
|
+<verify> |
|
+# 3 == CURLE_URL_MALFORMAT |
|
+<errorcode> |
|
+3 |
|
+</errorcode> |
|
+</verify> |
|
+</testcase> |
|
diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in |
|
index ed4d69f..124a276 100644 |
|
--- a/tests/libtest/Makefile.in |
|
+++ b/tests/libtest/Makefile.in |
|
@@ -86,7 +86,7 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \ |
|
lib599$(EXEEXT) lib1500$(EXEEXT) lib1501$(EXEEXT) \ |
|
lib1502$(EXEEXT) lib1503$(EXEEXT) lib1504$(EXEEXT) \ |
|
lib1505$(EXEEXT) lib1506$(EXEEXT) lib1507$(EXEEXT) \ |
|
- lib1508$(EXEEXT) |
|
+ lib1508$(EXEEXT) lib1529$(EXEEXT) |
|
subdir = tests/libtest |
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
|
am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ |
|
@@ -188,6 +188,13 @@ am_lib1508_OBJECTS = lib1508-lib1508.$(OBJEXT) $(am__objects_151) \ |
|
$(am__objects_152) $(am__objects_153) |
|
lib1508_OBJECTS = $(am_lib1508_OBJECTS) |
|
lib1508_DEPENDENCIES = $(am__DEPENDENCIES_1) |
|
+am__objects_X60 = lib1529-first.$(OBJEXT) |
|
+am__objects_X61 = lib1529-testutil.$(OBJEXT) |
|
+am__objects_X62 = ../../lib/lib1529-warnless.$(OBJEXT) |
|
+am_lib1529_OBJECTS = lib1529-lib1529.$(OBJEXT) $(am__objects_X60) \ |
|
+ $(am__objects_X61) $(am__objects_X62) |
|
+lib1529_OBJECTS = $(am_lib1529_OBJECTS) |
|
+lib1529_DEPENDENCIES = $(am__DEPENDENCIES_1) |
|
am__objects_21 = lib500-first.$(OBJEXT) |
|
am__objects_22 = lib500-testutil.$(OBJEXT) |
|
am__objects_23 = lib500-testtrace.$(OBJEXT) |
|
@@ -648,6 +655,7 @@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \ |
|
$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \ |
|
$(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \ |
|
$(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \ |
|
+ $(lib1529_SOURCES) \ |
|
$(lib500_SOURCES) $(lib501_SOURCES) \ |
|
$(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \ |
|
$(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \ |
|
@@ -679,6 +687,7 @@ DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \ |
|
$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \ |
|
$(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \ |
|
$(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \ |
|
+ $(lib1529_SOURCES) \ |
|
$(lib500_SOURCES) $(lib501_SOURCES) \ |
|
$(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \ |
|
$(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \ |
|
@@ -1178,6 +1187,9 @@ lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507 |
|
lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
|
lib1508_LDADD = $(TESTUTIL_LIBS) |
|
lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508 |
|
+lib1529_SOURCES = lib1529.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
|
+lib1529_LDADD = $(TESTUTIL_LIBS) |
|
+lib1529_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1529 |
|
@BUILD_LIBHOSTNAME_FALSE@noinst_LTLIBRARIES = |
|
|
|
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, |
|
@@ -1282,6 +1294,9 @@ lib1507$(EXEEXT): $(lib1507_OBJECTS) $(lib1507_DEPENDENCIES) $(EXTRA_lib1507_DEP |
|
lib1508$(EXEEXT): $(lib1508_OBJECTS) $(lib1508_DEPENDENCIES) $(EXTRA_lib1508_DEPENDENCIES) |
|
@rm -f lib1508$(EXEEXT) |
|
$(LINK) $(lib1508_OBJECTS) $(lib1508_LDADD) $(LIBS) |
|
+lib1529$(EXEEXT): $(lib1529_OBJECTS) $(lib1529_DEPENDENCIES) $(EXTRA_lib1529_DEPENDENCIES) |
|
+ @rm -f lib1529$(EXEEXT) |
|
+ $(LINK) $(lib1529_OBJECTS) $(lib1529_LDADD) $(LIBS) |
|
lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES) $(EXTRA_lib500_DEPENDENCIES) |
|
@rm -f lib500$(EXEEXT) |
|
$(LINK) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS) |
|
@@ -1557,6 +1572,10 @@ distclean-compile: |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-lib1508.Po@am__quote@ |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-testutil.Po@am__quote@ |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-warnless.Po@am__quote@ |
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1529-first.Po@am__quote@ |
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1529-lib1529.Po@am__quote@ |
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1529-testutil.Po@am__quote@ |
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1529-warnless.Po@am__quote@ |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-first.Po@am__quote@ |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-lib500.Po@am__quote@ |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-testtrace.Po@am__quote@ |
|
@@ -2312,6 +2331,62 @@ lib1508-warnless.obj: ../../lib/warnless.c |
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi` |
|
|
|
+lib1529-lib1529.o: lib1529.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1529-lib1529.o -MD -MP -MF $(DEPDIR)/lib1529-lib1529.Tpo -c -o lib1529-lib1529.o `test -f 'lib1529.c' || echo '$(srcdir)/'`lib1529.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1529-lib1529.Tpo $(DEPDIR)/lib1529-lib1529.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1529.c' object='lib1529-lib1529.o' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1529-lib1529.o `test -f 'lib1529.c' || echo '$(srcdir)/'`lib1529.c |
|
+ |
|
+lib1529-lib1529.obj: lib1529.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1529-lib1529.obj -MD -MP -MF $(DEPDIR)/lib1529-lib1529.Tpo -c -o lib1529-lib1529.obj `if test -f 'lib1529.c'; then $(CYGPATH_W) 'lib1529.c'; else $(CYGPATH_W) '$(srcdir)/lib1529.c'; fi` |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1529-lib1529.Tpo $(DEPDIR)/lib1529-lib1529.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1529.c' object='lib1529-lib1529.obj' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1529-lib1529.obj `if test -f 'lib1529.c'; then $(CYGPATH_W) 'lib1529.c'; else $(CYGPATH_W) '$(srcdir)/lib1529.c'; fi` |
|
+ |
|
+lib1529-first.o: first.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1529-first.o -MD -MP -MF $(DEPDIR)/lib1529-first.Tpo -c -o lib1529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1529-first.Tpo $(DEPDIR)/lib1529-first.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1529-first.o' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c |
|
+ |
|
+lib1529-first.obj: first.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1529-first.obj -MD -MP -MF $(DEPDIR)/lib1529-first.Tpo -c -o lib1529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi` |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1529-first.Tpo $(DEPDIR)/lib1529-first.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1529-first.obj' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi` |
|
+ |
|
+lib1529-testutil.o: testutil.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1529-testutil.o -MD -MP -MF $(DEPDIR)/lib1529-testutil.Tpo -c -o lib1529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1529-testutil.Tpo $(DEPDIR)/lib1529-testutil.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1529-testutil.o' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c |
|
+ |
|
+lib1529-testutil.obj: testutil.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1529-testutil.obj -MD -MP -MF $(DEPDIR)/lib1529-testutil.Tpo -c -o lib1529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi` |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1529-testutil.Tpo $(DEPDIR)/lib1529-testutil.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1529-testutil.obj' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi` |
|
+ |
|
+../../lib/lib1529-warnless.o: ../../lib/warnless.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1529-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/lib1529-warnless.Tpo -c -o ../../lib/lib1529-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1529-warnless.Tpo ../../lib/$(DEPDIR)/lib1529-warnless.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1529-warnless.o' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1529-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c |
|
+ |
|
+../../lib/lib1529-warnless.obj: ../../lib/warnless.c |
|
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1529-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/lib1529-warnless.Tpo -c -o ../../lib/lib1529-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi` |
|
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1529-warnless.Tpo ../../lib/$(DEPDIR)/lib1529-warnless.Po |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1529-warnless.obj' libtool=no @AMDEPBACKSLASH@ |
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1529-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi` |
|
+ |
|
lib500-lib500.o: lib500.c |
|
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-lib500.o -MD -MP -MF $(DEPDIR)/lib500-lib500.Tpo -c -o lib500-lib500.o `test -f 'lib500.c' || echo '$(srcdir)/'`lib500.c |
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib500-lib500.Tpo $(DEPDIR)/lib500-lib500.Po |
|
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc |
|
index bf73036..4f3ef6f 100644 |
|
--- a/tests/libtest/Makefile.inc |
|
+++ b/tests/libtest/Makefile.inc |
|
@@ -23,7 +23,8 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \ |
|
lib582 lib583 lib585 lib586 lib587 \ |
|
lib590 lib591 lib597 lib598 lib599 \ |
|
\ |
|
- lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 |
|
+ lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \ |
|
+ lib1529 |
|
|
|
chkhostname_SOURCES = chkhostname.c ../../lib/curl_gethostname.c |
|
chkhostname_LDADD = @CURL_NETWORK_LIBS@ |
|
@@ -320,3 +321,7 @@ lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507 |
|
lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
|
lib1508_LDADD = $(TESTUTIL_LIBS) |
|
lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508 |
|
+ |
|
+lib1529_SOURCES = lib1529.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) |
|
+lib1529_LDADD = $(TESTUTIL_LIBS) |
|
+lib1529_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1529 |
|
diff --git a/tests/libtest/lib1529.c b/tests/libtest/lib1529.c |
|
new file mode 100644 |
|
index 0000000..3def142 |
|
--- /dev/null |
|
+++ b/tests/libtest/lib1529.c |
|
@@ -0,0 +1,59 @@ |
|
+/*************************************************************************** |
|
+ * _ _ ____ _ |
|
+ * Project ___| | | | _ \| | |
|
+ * / __| | | | |_) | | |
|
+ * | (__| |_| | _ <| |___ |
|
+ * \___|\___/|_| \_\_____| |
|
+ * |
|
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. |
|
+ * |
|
+ * This software is licensed as described in the file COPYING, which |
|
+ * you should have received as part of this distribution. The terms |
|
+ * are also available at http://curl.haxx.se/docs/copyright.html. |
|
+ * |
|
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
|
+ * copies of the Software, and permit persons to whom the Software is |
|
+ * furnished to do so, under the terms of the COPYING file. |
|
+ * |
|
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
|
+ * KIND, either express or implied. |
|
+ * |
|
+ ***************************************************************************/ |
|
+ |
|
+#include "test.h" |
|
+ |
|
+#include "memdebug.h" |
|
+ |
|
+int test(char *URL) |
|
+{ |
|
+ CURL *curl = NULL; |
|
+ CURLcode res = CURLE_FAILED_INIT; |
|
+ char bURL[512]; |
|
+ snprintf(bURL, sizeof(bURL), "%s HTTP/1.1\r\nGET http://1529.com/1529", URL); |
|
+ |
|
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { |
|
+ fprintf(stderr, "curl_global_init() failed\n"); |
|
+ return TEST_ERR_MAJOR_BAD; |
|
+ } |
|
+ |
|
+ if((curl = curl_easy_init()) == NULL) { |
|
+ fprintf(stderr, "curl_easy_init() failed\n"); |
|
+ curl_global_cleanup(); |
|
+ return TEST_ERR_MAJOR_BAD; |
|
+ } |
|
+ |
|
+ test_setopt(curl, CURLOPT_URL, bURL); |
|
+ test_setopt(curl, CURLOPT_PROXY, libtest_arg2); |
|
+ test_setopt(curl, CURLOPT_VERBOSE, 1L); |
|
+ test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); |
|
+ test_setopt(curl, CURLOPT_HEADER, 1L); |
|
+ |
|
+ res = curl_easy_perform(curl); |
|
+ |
|
+test_cleanup: |
|
+ |
|
+ curl_easy_cleanup(curl); |
|
+ curl_global_cleanup(); |
|
+ |
|
+ return (int)res; |
|
+} |
|
-- |
|
2.1.0 |
|
|
|
|