Coder Social home page Coder Social logo

duta's People

Contributors

champo avatar esneider avatar kvnknny avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

esneider

duta's Issues

Connection failure

If an outbound connection fails to resolve, the proxy wont take it nicely.

Dont send absolute uris to origin servers

When trying to request http://blog.dwolla.com/ach-goes-real-time-with-fisync-free-for-banks-and-credit-unions/ through the proxy the response is invalid.

Valid request with curl (without dUta):

jpcivile@whitey ~ $ curl  -vvv http://blog.dwolla.com/ach-goes-real-time-with-fisync-free-for-banks-and-credit-unions/ > /dev/null
* About to connect() to blog.dwolla.com port 80 (#0)
*   Trying 199.79.48.49...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
> GET /ach-goes-real-time-with-fisync-free-for-banks-and-credit-unions/ HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-apple-darwin10.8.0) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.6 libidn/1.22
> Host: blog.dwolla.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Tue, 08 May 2012 19:05:28 GMT
< Server: Apache
< Vary: Accept-Encoding,Cookie
< Cache-Control: max-age=3, must-revalidate
< WP-Super-Cache: Served supercache file from PHP
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
< 
{ [data not shown]
100 32111    0 32111    0     0  11077      0 --:--:--  0:00:02 --:--:-- 12402
* Connection #0 to host blog.dwolla.com left intact
* Closing connection #0

Invalid response (with dUta):

jpcivile@whitey ~ $ curl -x localhost:9999 -vvv http://blog.dwolla.com/ach-goes-real-time-with-fisync-free-for-banks-and-credit-unions/
* About to connect() to proxy localhost port 9999 (#0)
*   Trying 127.0.0.1... connected
> GET http://blog.dwolla.com/ach-goes-real-time-with-fisync-free-for-banks-and-credit-unions/ HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-apple-darwin10.8.0) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.6 libidn/1.22
> Host: blog.dwolla.com
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 08 May 2012 19:05:41 GMT
< Server: Apache
< Set-Cookie: PHPSESSID=mucunfles8q3vr25qh09m8kjr5; path=/
< Expires: Wed, 11 Jan 1984 05:00:00 GMT
< Cache-Control: no-cache, must-revalidate, max-age=0
< Pragma: no-cache
< Vary: Cookie,Accept-Encoding
< X-Pingback: http://blog.dwolla.com/xmlrpc.php
< Last-Modified: Tue, 08 May 2012 19:05:41 GMT
< Location: http://blog.dwolla.comhttp/blog.dwolla.com/ach-goes-real-time-with-fisync-free-for-banks-and-credit-unions/
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
< 
* Closing connection #0

move parsing logic

from RequestChannelHandler.read and Operation.addResponseData to a single place, probably in Operation or FilterChain

Use FileChannel to store data if needed

If a message is too big or of unknown size, we should a FileChannel to read from the SocketChannel. Handy methods like transferTo and transferFrom should make this rather painless.

the label-names of headers are case insensitive

the label-name of a message header is case insensitive, so when pasting headers with the same label-name, this should be taken into account.. notice that this implies that if the original label-names are to be saved, there could be more than one variation (ej: Date, date, etc)

Message boundaries are not being respected

When reading the end of a message, if the start of the next one is read in the same channel read operation, the second message data will be added to the first message. The correct behaviour would be to create a new message with the data that doesn't belong to the first one.

This isn't a problem if pipelining isnt enabled.

Bigger header sizes

If the header is bigger that the size of the first buffer, it wont be parsed (the proxy'll probably go haywire)

File size filter

Must support both parsing Content-Length header and chunked encodings

Don't expect response headers to arrive full

Right now the response parser expects to read the whole responde header in the first read. Clearly, that's not smart. A logic closer to what RequestChannelHandler does would be awesome.

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.