abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neale Upstone <ne...@nealeupstone.com>
Subject Error (?) in AstractResponseContext.addHeaders() - the cause of my previous issue
Date Thu, 22 Nov 2007 21:06:44 GMT

This is surely, not correct...


  public void addHeader(String name, Object value) {
    Map<String,List<Object>> headers = getHeaders();
    List<Object> values = new ArrayList<Object>();
    if (values == null) {
      values = new ArrayList<Object>();
      headers.put(name, values);
    }
    values.add(value);
  }

I'd suggest that the it should read:

  List<Object> values = headers.get(name); as the 3rd line...


In fact, this would probably explain my previous problem of headers not 
being returned, as headers never gets anything written to it.

Cheers,

Neale


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message