Server for basic setup

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
jms
Posts: 108
Joined: Thu May 05, 2016 8:29 pm
Contact:

Re: Server for basic setup

Post by jms » Wed Sep 28, 2016 4:10 pm

To answer the "why" you're looking for a CRLF that won't come.

But you'd have to read up on HTTP.

https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
Certain buggy HTTP/1.0 client implementations generate extra CRLF's after a POST request. To restate what is explicitly forbidden by the BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an extra CRLF.
Jon

markxr
Posts: 62
Joined: Wed Jun 01, 2016 3:41 pm

Re: Server for basic setup

Post by markxr » Wed Sep 28, 2016 10:11 pm

lukesky333 wrote:Thanks a lot, I'll try it at home.

Is your miniservet able to handle POST and GET vars?
Unpacking form-encoded data is a problem, because there is very little ram and form posts can get big. That's why I don't use multipart/form-data POSTs, and just use PUT instead (client-side JS deals with it).

I imagine we could unpack a POST, depending on the maximum size. The problem is that there is hardly any ram available, so we'd want to keep the whole POST body in ram, and also unpack it into ram, which would use approximately 2x the post size.

There may be some ugly(ish) solutions to this, but for my purposes I haven't needed to implement them yet.

Post Reply