You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2006/06/28 14:37:14 UTC

Re: svn commit: r417666 - in /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server: ResponseContext.java exceptions/AbderaServerException.java servlet/AbderaServlet.java

On 6/28/06, eliast@apache.org <el...@apache.org> wrote:

> @@ -82,6 +83,18 @@
>        if (context.getLocation() != null)
>          response.setHeader("Location", context.getLocation().toString());
>        handleCachePolicy(response, context.getCachePolicy());
> +
> +      // Add any custom headers after we've set the known ones,
> +      // giving the developer an option to replace or set multiple
> +      // headers. If they want to skip the ones above, they simply
> +      // don't set them.
> +      Map<String, String> headers = context.getHeaders();
> +      if(headers != null) {
> +        for(String header : headers.keySet()) {
> +          response.setHeader(header, headers.get(header));
> +        }
> +      }

The spacing here (between if/for and the following paren) is off
compared to the rest of this file.  Keeping that sort of thing
consistent helps with readability.

-garrett