Skip to content

wsgi: properly pass through requests headers#24

Merged
posborne merged 1 commit into
mainfrom
posborne/wsgi-http-headers
Dec 11, 2025
Merged

wsgi: properly pass through requests headers#24
posborne merged 1 commit into
mainfrom
posborne/wsgi-http-headers

Conversation

@posborne
Copy link
Copy Markdown
Member

No description provided.

@posborne posborne requested a review from erikrose December 11, 2025 17:36
@posborne posborne force-pushed the posborne/wsgi-http-headers branch from 41968b2 to 891c550 Compare December 11, 2025 17:41
Comment thread fastly_compute/wsgi.py
environ[wsgi_key] = header_value_str

# If there are more headers, continue with next cursor
if next_cursor is None:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not float this test up to the while condition, e.g. while cursor is not None?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered it but you would need to have an extra assignment of the value outside the loop in addition to inside the loop (basically, python doesn't have do-while or assignments with checks in the loop header).

I think it's probably better as-is.

@posborne posborne merged commit 3682c59 into main Dec 11, 2025
3 checks passed
@posborne posborne deleted the posborne/wsgi-http-headers branch December 11, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants