12 Feb, 2015

1 commit


09 Feb, 2015

7 commits


05 Feb, 2015

2 commits


04 Feb, 2015

5 commits


03 Feb, 2015

7 commits


29 Jan, 2015

3 commits


27 Jan, 2015

1 commit


23 Jan, 2015

5 commits


22 Jan, 2015

3 commits

  • git-svn-id: https://svn.forgerock.org/openig/trunk@845 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
    violette
     
  • git-svn-id: https://svn.forgerock.org/openig/trunk@844 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
    violette
     
  • As the URI rebasing is done at different places in the code
    we'd like to have a BaseUriHandler/Filter in order to factor
    out the code.
    
    Following the same scheme as the "Timer" decorator, the "baseURI"
    decorator is created by default in the Gateway Servlet.
    (Named "baseUri" and created at startup time in the top-level heap.)
    
    * GatewayServlet.class, Route.class
    The creation of the "baseUri" decorator means the attribute
    class 'baseURI' is no longer needed as the URI rebasing is now
    directly done by the decorator. In the other hand,
    the heap initialization performed within both class constructors,
    contained a list of reservedFieldNames where the 'baseURI'was present.
    It has been removed from there as it is now a global decorator.
    
    * RouteTest.java
    Removed unit test 'testRouteIsRebasingTheRequestUri'(Duplicated
    in the RouteBuilder test, and the RouteBuilder has the responsability
    to apply decorators).
    
    git-svn-id: https://svn.forgerock.org/openig/trunk@843 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
    violette
     

20 Jan, 2015

1 commit

  • The previous commit introduced a regression, especially for GET messages
    being sent with an empty entity where they should have no entity at all.
    
    They were being falsely detected as messages with content because we were
    comparing `EMPTY_STREAM` with `Entity.head` (the branched content) instead
    of the `Entity.trunk` (`head` being re-created every time OpenIG tries to read
    the content, so in the `HttpBasicAuthFilter` for example, we push the Entity,
    then delegates to the next handler in chain, so when message is sent, the
    `head` is != from the `trunk` and cannot be == to `EMPTY_STREAM`)
    
    I could not reliably reproduce that in a unit test with a real HTTP Server
    because the failure also need the HTTPClient to re-use the same connection
    for 2 consecutive messages. Thus, I only added a small `Entity` unit test
    to make sure that `Entity.mayContainData()` behave correct even when the
    entity is pushed/popped.
    
    git-svn-id: https://svn.forgerock.org/openig/trunk@838 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
    guillaume.sauthier
     

19 Jan, 2015

3 commits


16 Jan, 2015

2 commits

  • The toString() method is now implemented and tested.
    We also decide to replace Expression constructor by a more conventional valueOf(...) factory method.
    A new Expression is now created by Expression exp = Expression.valueOf(<Expression string>);
    
    git-svn-id: https://svn.forgerock.org/openig/trunk@834 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
    violette
     
  • The `Entity.isEmpty()` method relied on `InputStream.available()` returning
    something different of `0` (zero) to detect if the entity was empty or not.
    This technic is not reliable enough since the javadoc clearly states that
    this return the number of bytes that can be read **without blocking**, that
    means that the result of this method depends on the network (and to some
    extension to the web container), not entirely on the message.
    
    The idea here is to now check if the wrapped stream is the `EMPTY_STREAM` instance
    to detect if the entity is empty or not.
    This is better than the old solution because we don't rely anymore on an external
    `InputStream` implementation, but that will not detect a user provided stream with
    no data inside. This is why `isEmpty()` has been renamed to `mayContainData()`.
    There is also a new `setEmpty()` method to mark the entity as empty (simply assign
    `EMPTY_STREAM` to the wrapped stram field).
    
    git-svn-id: https://svn.forgerock.org/openig/trunk@833 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
    guillaume.sauthier