Giter VIP home page Giter VIP logo

Comments (3)

mandar1jn avatar mandar1jn commented on July 29, 2024

image

because of this comment, I tried using lowercase names for the headers and this fixes the issue. I'll leave this issue open as this is probably a library issue

from adafruit_circuitpython_httpserver.

mandar1jn avatar mandar1jn commented on July 29, 2024

Okay. The headers are now somewhat correct. Sadly, it looks like the content length header is always set to 38 even when the content is longer or shorter, resulting in cut off json strings

from adafruit_circuitpython_httpserver.

mandar1jn avatar mandar1jn commented on July 29, 2024

Update: the content-length header is locked to the length of the first response. Currently circumventing this with a patch to response.py that replaces with headers.setdefault("Content-Length", content_length or len(body)) with headers["Content-Length"] = content_length or len(body). This is usable for us since we don't require the content length to be set in the headers object but this might not work in other cases

from adafruit_circuitpython_httpserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.