Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undici error on Windows with https #235

Open
ibenrh opened this issue Feb 20, 2024 · 4 comments
Open

Undici error on Windows with https #235

ibenrh opened this issue Feb 20, 2024 · 4 comments
Labels
bug Something isn't working P3

Comments

@ibenrh
Copy link

ibenrh commented Feb 20, 2024

When running func start with --useHttps on Windows you get the error message:

Exception: Headers.append: ":method" is an invalid header name.
Stack: TypeError: Headers.append: ":method" is an invalid header name.

This is caused by any undici versions higher than 5.27.2.

Example at: https://github.com/pellebjerkestrand/azure-functions-core-tools-invalid-header-method/tree/main

@ejizba ejizba transferred this issue from Azure/azure-functions-core-tools Mar 13, 2024
@ejizba ejizba added bug Something isn't working P3 labels Mar 19, 2024
@ejizba
Copy link
Contributor

ejizba commented Mar 19, 2024

Looks like we're not the only ones hitting an error like this. It has to do with pseudo headers in http/2 and I'm not entirely sure what the recommended behavior is.

I can repro this myself on Windows with --useHttps, but not mac. I checked telemetry and I'm not seeing evidence of this error in Azure - seems like it's only a problem locally.

@ejizba ejizba added this to the Backlog Candidates milestone Mar 19, 2024
@steffennilsen
Copy link

steffennilsen commented Apr 9, 2024

I am running into the same issue with local hosting on Linux after enabling --useHttps, @ibenrh solution of downgrading undici solved the issue for me

@ibenrh
Copy link
Author

ibenrh commented Apr 10, 2024

Yeah, we've temporarily solved it that way too for now, @steffennilsen :)

@timtucker-dte
Copy link

Would starting up the local server with http2 support disabled fix this by preventing the browser from sending http2 pseudo headers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3
Projects
None yet
Development

No branches or pull requests

4 participants