Merged branch 'jetty-9.2.x' into 'master'.

This commit is contained in:
Simone Bordet 2014-10-23 12:54:07 +02:00
commit 360fce58be
2 changed files with 6 additions and 0 deletions

View File

@ -151,10 +151,15 @@ public interface Request
* @param name the name of the header
* @param value the value of the header
* @return this request object
* @see #header(HttpHeader, String)
*/
Request header(String name, String value);
/**
* <p>Adds the given {@code value} to the specified {@code header}.</p>
* <p>Multiple calls with the same parameters will add multiple values;
* use the value {@code null} to remove the header completely.</p>
*
* @param header the header name
* @param value the value of the header
* @return this request object

View File

@ -847,6 +847,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
response = client.newRequest("localhost", connector.getLocalPort())
.scheme(scheme)
.header(HttpHeader.USER_AGENT, null)
.header(HttpHeader.USER_AGENT, userAgent)
.timeout(5, TimeUnit.SECONDS)
.send();