Menu

#32 Cannot retrieve multiple unparsed headers.

open
nobody
Bug (26)
5
2010-11-15
2010-11-15
Anonymous
No

As far as I can tell the only methods available to retrieve headers from a request are:
* getValue() - returns the first header with the specified name, unparsed.
* getValues() - return all headers with the specified name, parsed (ie split with comma).

Currently it isn't possible to retrieve all headers for a specified name, unparsed. The method is available in the class org.simpleframework.http.core.Message class as getAll() but this method doesn't form part of the RequestHeader interface.

An example
----

We must use the getValues() method to handle a request with the following headers:
Range: bytes=0-1
Range: bytes=3-5

However, calling getValues() will incorrectly parse a header like the following:
Range: bytes=0-1,3-5

In the second case getAll() would correctly return one result.

Discussion


Log in to post a comment.

Auth0 Logo