Skip to content

Commit 5117a54

Browse files
dittopsclaude
andcommitted
fix: correct curl syntax for file upload test
Fixed multipart/form-data curl command in validate_services function by removing quotes around $INPUT_DATA variable. This allows bash to properly expand the -F options as separate arguments to curl instead of treating them as a single quoted string. This resolves the HTTP 000 status error where file upload requests were failing to reach the server. Changes: - Line 134: Removed quotes around $INPUT_DATA in HTTP_STATUS curl command - Line 138: Removed quotes around $INPUT_DATA in CONTENT curl command 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: dittops <dittops@gmail.com>
1 parent 6c621b9 commit 5117a54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PolyLingua/tests/test_compose_on_xeon.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ function validate_services() {
131131

132132
if [[ "$CONTENT_TYPE" == "multipart/form-data" ]]; then
133133
# Handle file upload
134-
local HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$INPUT_DATA" "$URL")
134+
local HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST $INPUT_DATA "$URL")
135135

136136
if [ "$HTTP_STATUS" -eq 200 ]; then
137137
echo "[ $SERVICE_NAME ] HTTP status is 200. Checking content..."
138-
local CONTENT=$(curl -s -X POST "$INPUT_DATA" "$URL" | tee ${LOG_PATH}/${SERVICE_NAME}.log)
138+
local CONTENT=$(curl -s -X POST $INPUT_DATA "$URL" | tee ${LOG_PATH}/${SERVICE_NAME}.log)
139139

140140
if echo "$CONTENT" | grep -q "$EXPECTED_RESULT"; then
141141
echo "[ $SERVICE_NAME ] ✓ Content is as expected."

0 commit comments

Comments
 (0)