mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 05:45:26 +01:00 
			
		
		
		
	- fix for web sites having leading spaces b4 html/xml content starts
This commit is contained in:
		| @@ -598,7 +598,7 @@ run_http_header() { | |||||||
|      local header |      local header | ||||||
|      local -i ret |      local -i ret | ||||||
|      local referer useragent |      local referer useragent | ||||||
|      local url |      local url redirect | ||||||
|  |  | ||||||
|      outln; pr_headlineln " Testing HTTP header response @ \"$URL_PATH\" " |      outln; pr_headlineln " Testing HTTP header response @ \"$URL_PATH\" " | ||||||
|      outln |      outln | ||||||
| @@ -629,8 +629,8 @@ run_http_header() { | |||||||
|  |  | ||||||
|      debugme echo "$NOW_TIME: $HTTP_TIME" |      debugme echo "$NOW_TIME: $HTTP_TIME" | ||||||
|  |  | ||||||
|      sed  -e '/^<HTML/,$d' -e '/^<html/,$d' -e '/^<XML /,$d' -e '/<?XML /,$d' \ |      sed  -e '/^ .<HTML/,$d' -e '/^ .<html/,$d' -e '/^ .<XML /,$d' -e '/ .<?XML /,$d' \ | ||||||
|           -e '/^<xml /,$d' -e '/<?xml /,$d'  -e '/^<\!DOCTYPE/,$d' -e '/^<\!doctype/,$d' $HEADERFILE >$HEADERFILE.2 |           -e '/^ .<xml /,$d' -e '/ .<?xml /,$d'  -e '/^ .<\!DOCTYPE/,$d' -e '/^ .<\!doctype/,$d' $HEADERFILE >$HEADERFILE.2 | ||||||
| #### ^^^ Attention: the filtering for the html body only as of now, doesn't work for other content yet | #### ^^^ Attention: the filtering for the html body only as of now, doesn't work for other content yet | ||||||
|      mv $HEADERFILE.2  $HEADERFILE  # sed'ing in place doesn't work with BSD and Linux simultaneously |      mv $HEADERFILE.2  $HEADERFILE  # sed'ing in place doesn't work with BSD and Linux simultaneously | ||||||
|      ret=0 |      ret=0 | ||||||
| @@ -5478,4 +5478,4 @@ fi | |||||||
| exit $? | exit $? | ||||||
|  |  | ||||||
|  |  | ||||||
| #  $Id: testssl.sh,v 1.428 2015/12/22 19:31:51 dirkw Exp $ | #  $Id: testssl.sh,v 1.429 2015/12/22 20:08:51 dirkw Exp $ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dirk
					Dirk