###############################################################################
# DESCRIPTION
#	Trivial test for If-Modified-Since header.
#
# AUTHOR
#	Sonny Karlsson <ksonny@lotrax.org>
#
# DATE
#	July 10 2013
#
# COMMENTS
#	Server must return a 200 response, since we are passing a time 1
#	min before requested file's date as If-Modified-Since's parameter.
###############################################################################


INCLUDE __CONFIG
INCLUDE __MACROS

CLIENT
_CALL INIT
_CALL TESTDOC_GETEPOCH

# Test
_OP $TEST_DOC_EPOCH SUB 60 TEST_DOC_EPOCH

# Format date
_CALL FMT_DATE $TEST_DOC_EPOCH TEST_DOC_HTTPDATE

_REQ $HOST $PORT
__GET / $HTTPVER
__Host: $HOST
__If-Modified-Since: $TEST_DOC_HTTPDATE
__Connection: close
__
_EXPECT . "HTTP/1.1 200 OK"
_WAIT
END
