Commit Graph

21 Commits

Author SHA1 Message Date
Darshit Shah b06fca60ac Add unit test for parse_content_range() method
* http.c (test_parse_range_header): New function to test the
    function for parsing the HTTP/1.1 Content-Range header.
    * test.[ch]: Same
    * http.c (parse_content_range): Fix parsing code. Fail on scenarios
    mentioned in rfc 7233.
2015-08-30 21:34:32 +05:30
Ander Juaristi b60131a399 Added support for HSTS.
* Makefile.am: Added new source files hsts.c and hsts.h.
 * http.c (parse_strict_transport_security): new function for STS header
   parsing.
   (gethttp): update the HSTS store.
 * http.h: new include "hsts.h".
 * init.c: new options --hsts and --hsts-file.
 * main.c (get_hsts_database, load_hsts, save_hsts): new functions.
   New options --no-hsts and --hsts-file added to help.
   (main): load and save HSTS store.
 * options.h: new variables for supporting --hsts and --hsts-file.
 * retr.c (retrieve_url): rewrite the URI according to the HSTS policy before
   entering http_loop.
 * test.c, test.h: new unit tests for HSTS.
 * utils.c, utils.h (countchars): new function.
 * wget.h: new preprocessor check.
 * hsts.c, hsts.h: new files with the HSTS engine implementation.

Added support for HTTP Strict Transport Security (HSTS), as defined by RFC
6797.
2015-07-20 15:55:57 +02:00
Hubert Tarasiuk 92a889b278 Unit test for find_key_values.
* src/http.c: Add test_find_key_values.
* src/test.c (main): Run new test.
* src/test.h: Add test_find_key_values.
2015-07-20 15:31:06 +02:00
Hubert Tarasiuk 1113e78534 Unit test for has_key.
* src/http.c: Add test_has_key.
* src/test.c (main): Run new test.
* src/test.h: Add test_has_key.
2015-07-20 15:31:06 +02:00
Hubert Tarasiuk 70cbd59ed6 Unit test for find_key_value.
* src/http.c: Add test_find_key_value.
* src/test.c (main): Run new test.
* src/test.h: Add test_find_key_value.
2015-07-20 15:31:06 +02:00
Tim Rühsen c6ac51d5bc Move test_* function protoypes from test.c to test.h
* src/test.c: Remove test_* function prototypes, make tests_run static
* src/test.h: Add test_* function protoypes
2015-06-13 22:34:36 +02:00
Giuseppe Scrivano 16f1fb1d1f maint: update copyright year ranges to include 2015 2015-03-09 16:32:01 +01:00
Giuseppe Scrivano dd1b69c600 Remove trailing empty lines 2014-06-12 18:49:15 +02:00
Tim Ruehsen 38a7829dcb Fix compiler warnings 2014-05-12 12:18:50 +02:00
Giuseppe Scrivano 2f6aa1d741 mass change: update copyright years. 2011-01-01 13:19:37 +01:00
Giuseppe Scrivano 293008f682 Mass update copyright years. 2010-05-08 21:56:15 +02:00
Micah Cowan b9e9ad65cc Ran update-copyright. 2009-09-04 00:13:47 -07:00
Micah Cowan 7fc6af0faf Move declaration before statements. 2008-04-22 22:06:50 -07:00
Micah Cowan bc8f473272 Updated copyright year. 2008-01-25 05:04:01 -08:00
Micah Cowan 86395b297b Updated licensing exception for OpenSSL from the SFLC. 2007-11-28 00:05:33 -08:00
Micah Cowan 5dd09d9ba5 Update copyright lists, conforming to maintainer guidelines 2007-09-28 15:45:31 -07:00
micah 01346093a8 [svn] Applying fix #20430: Making tests more verbose. 2007-07-28 18:28:18 -07:00
micah 4d7c5e087b [svn] Merge of fix for bugs 20341 and 20410. 2007-07-09 22:53:22 -07:00
mtortonesi 1c7493b83e [svn] Added sanity checks for -k, -p, -r and -N when -O is given. Added fixes for 64-bit platforms. Updated copyright and maintainer information. 2006-07-14 06:25:50 -07:00
mtortonesi ea4ffded27 [svn] Restricted operational semantics of frontcmp and proclist from generic strings to directory names, and fixed dirname matching algorithm. Renamed above mentioned functions to subdir_p and dir_matches_p respectively. Added testcases for subdir_p and dir_matches_p. 2006-03-15 06:55:29 -08:00
mtortonesi 74415a7585 [svn] Added basic support for unit testing 2005-10-27 07:13:40 -07:00