Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

333 - Implement customHeadersToSkipOnWeakVersion functionality #343

Commits on Jan 16, 2017

  1. 333 - Implement customHeadersToSkipOnWeakVersion functionality

    - Introduced new registry option - customHeadersToSkipOnWekVersion which expects
    to be an array of strings denoting the headers that have to be omitted from
    the response in case a weak version is requested (i.e 1.x.x). The rational
    behind this is the need to control cache related headers - in case 1.x.x
    version is requested we would not like cache headers to be returned because
    otherwise the response will be cached. Next time when someone asks for 1.x.x
    it will get the cached response even though a new version may be available.
    - added unit and integration tests
    i-b-dimitrov committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    21ad554 View commit details
    Browse the repository at this point in the history
  2. 333 - Fixed some problems raised in the code review

    - also context.setHeader function was extended a bit and now includes a sanity
      check for the arguments
    i-b-dimitrov committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    8c4d71f View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2017

  1. 333 - Fixed the logic for setting the custom headers in case of POST …

    …and GET requests
    
    - for GET it will put the custom headers in the HTTP response headers
    - for POST it will put the custom headers in the response body
    - the setCustomHeaders was moved out of component.js to get-component.js under
      the name filterCustomHeaders. It's because in case of POST request the code
      path is different and goes to component(s).js instead of component.js. Now we
      do the filtering in one and the same place.
    - fixed a bug where we used to not take into account the custom headers in
      case of a unrendered component. For this reason the actual setting of
      response headers was moved from line 205 up to line 175.
    - fixed the registry acceptance tests. In their former variant when the GET
      tests passes they were used to leave the customHeadersToSkipOnWeakVersion
      settings so the POST tests were starting directly with this setting on.
      That's why new before/after sections were defined to reinitialize the
      registry before the tests and then recover it after them.
    i-b-dimitrov committed Jan 17, 2017
    Configuration menu
    Copy the full SHA
    b2f17e4 View commit details
    Browse the repository at this point in the history