Giter VIP home page Giter VIP logo

team12's People

Contributors

brwong20 avatar jasonsliu avatar liuchang2872 avatar plantver avatar ryanvoong avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jasonsliu

team12's Issues

proxy handler

Hi Team12,

We found two issues while trying to implement the proxy handler.

  1. In Server::session, if the request uri is /foo/bar/abc/def, you currently only look for /foo (which is req->uriHead()) in the uri2handler map. This is incorrect, because a handler's path in the config may be /foo/bar. Therefore, you must check for all possible combinations in uri2handler and pick the handler with the longest matching uri prefix:

    • /foo/bar/abc/def
    • /foo/bar/abc
    • /foo/bar
    • /foo
  2. The proxy handler will only work correctly if its path is set to / in the config. Currently, if the request uri is /, it will be changed to /index by Request::uriHead which is incorrect. It should be left as /.

Once these two issues are fixed, the proxy handler will work correctly.

Thanks!
spaceteam

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.