Skip to content

fix(bootstrap): trim whitespace from media_type in verify-hosted-bootstrap.sh - #2765

Open
vaibhavsrv wants to merge 1 commit into
Osmantic:mainfrom
vaibhavsrv:fix/verify-hosted-bootstrap-media-type-trim
Open

fix(bootstrap): trim whitespace from media_type in verify-hosted-bootstrap.sh#2765
vaibhavsrv wants to merge 1 commit into
Osmantic:mainfrom
vaibhavsrv:fix/verify-hosted-bootstrap-media-type-trim

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Problem

In ods/scripts/verify-hosted-bootstrap.sh, media_type is extracted using printf '%s' "${content_type%%;*}" | tr '[:upper:]' '[:lower:]'. If the HTTP Content-Type header contains trailing spaces before the semicolon (e.g. text/plain ; charset=utf-8), the parameter expansion leaves trailing whitespace ("text/plain "), causing the case "$media_type" in text/plain) check to fail unexpectedly.

Fix

Pipe media_type through xargs in verify-hosted-bootstrap.sh to trim surrounding whitespace before running header format checks.

Verification

Ran bash -n ods/scripts/verify-hosted-bootstrap.sh (passed cleanly). git diff --check passed cleanly.

@vaibhavsrv
vaibhavsrv force-pushed the fix/verify-hosted-bootstrap-media-type-trim branch from 1d0cbf2 to e9d586f Compare August 30, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant