Skip to content

Tornado HTTPServer extra arguments #9916

@mysiar

Description

@mysiar

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

I have a use case when I need to send quite a long url params to Streamlit application.
Actually I need to use the whole limit of Chrome browser which is 2,000,000 characters.
Currently server brakes down with over 65k characters and without any error messages.

My proposal is to add two extra arguments to Tornado HTTPServer
https://github.com/streamlit/streamlit/blob/develop/lib/streamlit/web/server/server.py#L123
arguments are: max_header_size and max_body_size

I have code ready and tested along with config update so this arguments are fully configurable through Streamlit server config the same way like maxUploadSize

Let me know and I will create pull request with full code implementation

Reproducible Code Example

import streamlit as st
st.query_params.to_dict()

Steps To Reproduce

run basic Streamlit application and send in url over 65k characters query params

Expected Behavior

to work

Current Behavior

browser returns empty response and it it was hard to find out where exactly error lies

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.40.0
  • Python version: 3.12
  • Operating System: Linux
  • Browser: Chrome

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:serverRelated to the web serverfeature:configRelated to `config.toml` and config optionstype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions