Code

Do not strip CR when grepping HTTP headers.
authorPat Thoyts <patthoyts@users.sourceforge.net>
Sun, 12 Sep 2010 09:37:24 +0000 (10:37 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 1 Oct 2010 22:08:48 +0000 (23:08 +0100)
By default, MSYS grep reads in text-mode and converts CRLF into LF line
endings. For testing HTTP use binary mode (-U) as checking is done for
CR in HTTP headers

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
t/t5560-http-backend-noserver.sh
t/test-lib.sh

index 44885b850c4a1c3a09b8b078a643cf7cd8918213..4b0364374dfa080558200d66a7306c436577cf95 100755 (executable)
@@ -5,6 +5,8 @@ test_description='test git-http-backend-noserver'
 
 HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
 
+test_have_prereq MINGW && export GREP_OPTIONS=-U
+
 run_backend() {
        echo "$2" |
        QUERY_STRING="${1#*\?}" \
index a85e7954adb857253375e8eefa31124d6b189160..2af8f10c837fd8c1543cf17d877ae0684cbc61a4 100644 (file)
@@ -970,6 +970,7 @@ case $(uname -s) in
        # no POSIX permissions
        # backslashes in pathspec are converted to '/'
        # exec does not inherit the PID
+       test_set_prereq MINGW
        ;;
 *)
        test_set_prereq POSIXPERM