kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio: benchmark: Modern browsers produce requests more than 256 bytes.
So, not all of the request was read, and a browser would report than connection was reset.pull/164/head
rodzic
a355801fb1
commit
53193ba2e7
|
@ -5,7 +5,7 @@ import uasyncio as asyncio
|
|||
def serve(reader, writer):
|
||||
#print(reader, writer)
|
||||
#print("================")
|
||||
yield from reader.read(256)
|
||||
yield from reader.read(512)
|
||||
yield from writer.awrite("HTTP/1.0 200 OK\r\n\r\nHello.\r\n")
|
||||
yield from writer.aclose()
|
||||
#print("Finished processing request")
|
||||
|
|
|
@ -6,7 +6,7 @@ resp = "HTTP/1.0 200 OK\r\n\r\n" + "Hello.\r\n" * 1500
|
|||
def serve(reader, writer):
|
||||
#print(reader, writer)
|
||||
#print("================")
|
||||
yield from reader.read(256)
|
||||
yield from reader.read(512)
|
||||
yield from writer.awrite(resp)
|
||||
yield from writer.aclose()
|
||||
#print("Finished processing request")
|
||||
|
|
Ładowanie…
Reference in New Issue