(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'test git-http-backend'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/lib-httpd.sh)}) (C {(start_httpd)}) (FuncDef name: GET body: (BraceGroup children: [ (AndOr children: [ (SimpleCommand words: [ {(curl)} {(--include)} { (DQ ($ VSub_Name '$HTTPD_URL') (/) ($ VSub_Name '$SMART') (/repo.git/) ($ VSub_Number '$1') ) } ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(out)} spids: [42] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [45] ) ] ) (AndOr children: [ (Pipeline children: [ (SimpleCommand words: [{(tr)} {(SQ <'\\015'>)} {(Q)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(out)} spids: [59] ) ] ) (SimpleCommand words: [{(sed)} {(SQ <'\n'> <'\t\ts/Q$//\n'> <'\t\t1q\n'> <'\t'>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(act)} spids: [74] ) ] ) ] negated: False ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('HTTP/1.1 ') ($ VSub_Number '$2'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(exp)} spids: [87] ) ] ) (C {(test_cmp)} {(exp)} {(act)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [27] ) spids: [23 26] ) (FuncDef name: POST body: (BraceGroup children: [ (AndOr children: [ (SimpleCommand words: [ {(curl)} {(--include)} {(--data)} {(DQ ($ VSub_Number '$2'))} {(--header)} {(DQ ('Content-Type: application/x-') ($ VSub_Number '$1') (-request))} {(DQ ($ VSub_Name '$HTTPD_URL') (/smart/repo.git/) ($ VSub_Number '$1'))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(out)} spids: [137] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [140] ) ] ) (AndOr children: [ (Pipeline children: [ (SimpleCommand words: [{(tr)} {(SQ <'\\015'>)} {(Q)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(out)} spids: [154] ) ] ) (SimpleCommand words: [{(sed)} {(SQ <'\n'> <'\t\ts/Q$//\n'> <'\t\t1q\n'> <'\t'>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(act)} spids: [169] ) ] ) ] negated: False ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('HTTP/1.1 ') ($ VSub_Number '$3'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(exp)} spids: [182] ) ] ) (C {(test_cmp)} {(exp)} {(act)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [106] ) spids: [102 105] ) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/t556x_common)}) (SimpleCommand words: [{(grep)} {(SQ <'^[^#]'>)}] redirects: [ (Redir op_id:Redir_Great fd:16777215 arg_word:{(exp)} spids:[211]) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('\n') ('### refs/heads/master\n') ('###\n') ('GET /smart/repo.git/refs/heads/master HTTP/1.1 404 -\n') ('\n') ('### getanyfile default\n') ('###\n') ('GET /smart/repo.git/HEAD HTTP/1.1 200\n') ('GET /smart/repo.git/info/refs HTTP/1.1 200\n') ('GET /smart/repo.git/objects/info/packs HTTP/1.1 200\n') ('GET /smart/repo.git/objects/info/alternates HTTP/1.1 200 -\n') ('GET /smart/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n') ('GET /smart/repo.git/') ($ VSub_Name '$LOOSE_URL') (' HTTP/1.1 200\n') ('GET /smart/repo.git/') ($ VSub_Name '$PACK_URL') (' HTTP/1.1 200\n') ('GET /smart/repo.git/') ($ VSub_Name '$IDX_URL') (' HTTP/1.1 200\n') ('\n') ('### no git-daemon-export-ok\n') ('###\n') ('GET /smart_noexport/repo.git/HEAD HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/info/refs HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/objects/info/packs HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/objects/info/alternates HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/') ($ VSub_Name '$LOOSE_URL') (' HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/') ($ VSub_Name '$PACK_URL') (' HTTP/1.1 404 -\n') ('GET /smart_noexport/repo.git/') ($ VSub_Name '$IDX_URL') (' HTTP/1.1 404 -\n') ('\n') ('### git-daemon-export-ok\n') ('###\n') ('GET /smart_noexport/repo.git/HEAD HTTP/1.1 200\n') ('GET /smart_noexport/repo.git/info/refs HTTP/1.1 200\n') ('GET /smart_noexport/repo.git/objects/info/packs HTTP/1.1 200\n') ('GET /smart_noexport/repo.git/objects/info/alternates HTTP/1.1 200 -\n') ('GET /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n') ('GET /smart_noexport/repo.git/') ($ VSub_Name '$LOOSE_URL') (' HTTP/1.1 200\n') ('GET /smart_noexport/repo.git/') ($ VSub_Name '$PACK_URL') (' HTTP/1.1 200\n') ('GET /smart_noexport/repo.git/') ($ VSub_Name '$IDX_URL') (' HTTP/1.1 200\n') ('\n') ('### getanyfile true\n') ('###\n') ('GET /smart/repo.git/HEAD HTTP/1.1 200\n') ('GET /smart/repo.git/info/refs HTTP/1.1 200\n') ('GET /smart/repo.git/objects/info/packs HTTP/1.1 200\n') ('GET /smart/repo.git/objects/info/alternates HTTP/1.1 200 -\n') ('GET /smart/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n') ('GET /smart/repo.git/') ($ VSub_Name '$LOOSE_URL') (' HTTP/1.1 200\n') ('GET /smart/repo.git/') ($ VSub_Name '$PACK_URL') (' HTTP/1.1 200\n') ('GET /smart/repo.git/') ($ VSub_Name '$IDX_URL') (' HTTP/1.1 200\n') ('\n') ('### getanyfile false\n') ('###\n') ('GET /smart/repo.git/HEAD HTTP/1.1 403 -\n') ('GET /smart/repo.git/info/refs HTTP/1.1 403 -\n') ('GET /smart/repo.git/objects/info/packs HTTP/1.1 403 -\n') ('GET /smart/repo.git/objects/info/alternates HTTP/1.1 403 -\n') ('GET /smart/repo.git/objects/info/http-alternates HTTP/1.1 403 -\n') ('GET /smart/repo.git/') ($ VSub_Name '$LOOSE_URL') (' HTTP/1.1 403 -\n') ('GET /smart/repo.git/') ($ VSub_Name '$PACK_URL') (' HTTP/1.1 403 -\n') ('GET /smart/repo.git/') ($ VSub_Name '$IDX_URL') (' HTTP/1.1 403 -\n') ('\n') ('### uploadpack default\n') ('###\n') ('GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n') ('POST /smart/repo.git/git-upload-pack HTTP/1.1 200 -\n') ('\n') ('### uploadpack true\n') ('###\n') ('GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n') ('POST /smart/repo.git/git-upload-pack HTTP/1.1 200 -\n') ('\n') ('### uploadpack false\n') ('###\n') ('GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 403 -\n') ('POST /smart/repo.git/git-upload-pack HTTP/1.1 403 -\n') ('\n') ('### receivepack default\n') ('###\n') ('GET /smart/repo.git/info/refs?service=git-receive-pack HTTP/1.1 403 -\n') ('POST /smart/repo.git/git-receive-pack HTTP/1.1 403 -\n') ('\n') ('### receivepack true\n') ('###\n') ('GET /smart/repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n') ('POST /smart/repo.git/git-receive-pack HTTP/1.1 200 -\n') ('\n') ('### receivepack false\n') ('###\n') ('GET /smart/repo.git/info/refs?service=git-receive-pack HTTP/1.1 403 -\n') ('POST /smart/repo.git/git-receive-pack HTTP/1.1 403 -\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [214] ) ] ) (C {(test_expect_success)} {(SQ <'server request log matches test results'>)} { (SQ <'\n'> <'\tsed -e "\n'> <'\t\ts/^.* \\"//\n'> <'\t\ts/\\"//\n'> <'\t\ts/ [1-9][0-9]*\\$//\n'> <'\t\ts/^GET /GET /\n'> <'\t" >act <"$HTTPD_ROOT_PATH"/access.log &&\n'> <'\ttest_cmp exp act\n'> ) } ) (C {(stop_httpd)}) (C {(test_done)}) ] )