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

[BUG] Custom headers not sent when const=False #323

Closed
cirospaciari opened this issue Nov 28, 2022 · 3 comments
Closed

[BUG] Custom headers not sent when const=False #323

cirospaciari opened this issue Nov 28, 2022 · 3 comments

Comments

@cirospaciari
Copy link

cirospaciari commented Nov 28, 2022

Description

Custom header is only sent when const=True
Expected Behavior

Custom header must always be sent even without const=True

Environment:

  • Host OS: Debian GNU/Linux bookworm/sid x86_64 Kernel 6.0.0-2-amd64
  • Browser: Chrome 107.0.5304.110

[Optional] Additional Context

When using const=False no Custom headers are sent.

app.add_header("Server", "Robyn")
app.add_header("Content-Type", "text/plain")
@app.get('/plaintext')
def plaintext() -> str:
    return "Hello, world!"

When using const=True Date headers are sent.

@app.get('/plaintext', const=True)
def plaintext() -> str:
    return "Hello, world!"
    

I just find this, when trying to run TechEmPower Benchmarks without const


@cirospaciari cirospaciari changed the title [BUG] [BUG] Date headers not sent when const=False Nov 28, 2022
@sansyrox
Copy link
Member

Thank you @cirospaciari for opening this issue 😄

Can you please elaborate on what you mean by the Date headers?

@cirospaciari
Copy link
Author

cirospaciari commented Nov 28, 2022

Sorry actually i misunderstood the issue, whats is happening is:
After adding this custom headers

app.add_header("Server", "Robyn")
app.add_header("Content-Type", "text/plain")

Without const=True the headers are not sent.
Date header is fine

image

@cirospaciari cirospaciari changed the title [BUG] Date headers not sent when const=False [BUG] Custom headers not sent when const=False Nov 28, 2022
@sansyrox
Copy link
Member

@cirospaciari , this shouldn't happen. Will have to investigate. Thanks!

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

No branches or pull requests

3 participants