File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ RECEIVER_TAG=foobar
1111${NASEFA} auto-receive ${TEMPDIR} ${RECEIVER_TAG} some-tag some-other-tag &
1212RECEIVE_PID=${! }
1313log_debug " Started auto-receiver, PID: ${RECEIVE_PID} "
14+ trap " kill -9 ${RECEIVE_PID} || echo" EXIT
1415
1516BUNDLE_NAME=" send-autoreceive-test-$(( RANDOM)) "
1617F1=theplague.png
Original file line number Diff line number Diff line change @@ -10,24 +10,26 @@ source ${SCRIPT_DIR}/util.sh
1010BUNDLE_NAME=" web-send-receive-test-whitespace-$(( RANDOM)) "
1111F1=README.md
1212F1_WITH_SPACES=" READ ME.md"
13+ F1_URL_ENCODED=" READ%20ME.md"
1314
1415# Create a file with spaces in name
1516cp ${NASEFA_ROOT} /${F1} " ${TEMPDIR} /${F1_WITH_SPACES} "
1617
1718
1819PORT=8081
1920
20- ${NASEFA} web -bindAddr " :${PORT} " &
21+ ${NASEFA} web -allowBundlesListing - bindAddr " :${PORT} " &
2122WEB_PID=${! }
2223log_debug " Started web, PID: ${WEB_PID} "
24+ trap " kill -9 ${WEB_PID} || echo" EXIT
2325
2426${NASEFA} create -bundleName ${BUNDLE_NAME}
2527log_debug " Bundle created: ${BUNDLE_NAME} "
2628
2729curl -s -F " file1=@${TEMPDIR} /${F1_WITH_SPACES} " http://localhost:${PORT} /upload/${BUNDLE_NAME} > /dev/null || fail " Failed to upload files"
2830log_debug " Uploaded 1 file with spaces"
2931
30- curl -s " http://localhost:${PORT} /bundle/${BUNDLE_NAME} /${F1_WITH_SPACES } " > ${TEMPDIR} /${F1} || fail " Failed to download file"
32+ curl -s " http://localhost:${PORT} /bundle/${BUNDLE_NAME} /${F1_URL_ENCODED } " > ${TEMPDIR} /${F1} || fail " Failed to download file"
3133log_debug " Downloaded 1 file (saved without spaces)"
3234
3335kill ${WEB_PID}
Original file line number Diff line number Diff line change @@ -13,9 +13,10 @@ F2=README.md
1313
1414PORT=8081
1515
16- ${NASEFA} web -bindAddr " :${PORT} " &
16+ ${NASEFA} web -allowBundlesListing - bindAddr " :${PORT} " &
1717WEB_PID=${! }
1818log_debug " Started web, PID: ${WEB_PID} "
19+ trap " kill -9 ${WEB_PID} || echo" EXIT
1920
2021${NASEFA} create -bundleName ${BUNDLE_NAME}
2122log_debug " Bundle created: ${BUNDLE_NAME} "
You can’t perform that action at this time.
0 commit comments