Giter VIP home page Giter VIP logo

nbhttp's People

Contributors

mnot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nbhttp's Issues

bodies where they're not allowed

opensource.mirroring.de sends a body on a 304; this causes a dump because nbhttp tries to parse this as a HTTP response.

The trivial fix is to remember if there's an outstanding message, and if not, to ignore the input (probably closing the conn, because it's borked).

However, once pipelining is supported this won't be a complete solution, because there may be outstanding responses and a body where it shouldn't be.

Also need to evaluate the server-side analogy.

recursion issues

nbhttp uses recursion for many of its parsing algorithms, but this may present security issues.

E.g., common.py, when parsing a chunked body, will recurse through handle_input if more than a chunk is received at a time.

A very large chunk will cause a recursion overflow here.

This an similar places should put sane limits in place, where possible.

spdy_client does not seem to work with header compression turned off in spdy_common

Here is the trace:
Traceback (most recent call last):
File "spdy_client.py", line 346, in
test_client(sys.argv[1])
File "spdy_client.py", line 339, in test_client
req_body_write, req_done = c.req_start("GET", request_uri, [], printer, dumm
y)
File "spdy_client.py", line 136, in req_start
return conn.req_start(method, uri, req_hdrs, res_start_cb, req_body_pause)
File "spdy_client.py", line 159, in req_start
self._output(self._ser_syn_frame(CTL_SYN_STREAM, FLAG_NONE, stream_id, req_h
drs))
File "C:\nbhttp\src\spdy_common.py", line 230, in _ser_syn_frame
data = struct.pack("!IIH%ds" % len(hdrs),
TypeError: object of type 'NoneType' has no len()

Resource limits

e.g., idle connection timeouts, header size limits, url size limits, read timeouts.

Documentation

The data flows are pretty convoluted; at a minimum, they need to be well-documented.

dns blocks

Current implementation blocks on DNS lookups. I either need to implement DNS (push_udp?), use a separate process, or just punt for the time being.

Multi-threaded proxy

Can the nbhttp libaries (push_ctp, client & server/spdy_client, spdy_sever, etc) be used to implement a multi-threaded proxy server? Any comment or suggestion how to approach this? Thanks.

Pipelining support

In one way, this is quite simple to support, but doing it in a generic fashion that makes sense in different use cases (server, proxy, reverse proxy, client) is a different matter.

optimise message parsing

Right now handle_input recurses a lot, often leading to unnecessary header checks, etc. First step is probably to instrument it and see where this hurts.

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.