Skip to content

Commit ec05154

Browse files
committed
Add missing headers and comments
Mea culpa, I should know better by now.
1 parent 8dea296 commit ec05154

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/main/java/com/ning/http/client/providers/netty/handler/ConnectionStrategy.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
* Copyright (c) 2014 AsyncHttpClient Project. All rights reserved.
3+
*
4+
* This program is licensed to you under the Apache License Version 2.0,
5+
* and you may not use this file except in compliance with the Apache License Version 2.0.
6+
* You may obtain a copy of the Apache License Version 2.0 at
7+
* http://www.apache.org/licenses/LICENSE-2.0.
8+
*
9+
* Unless required by applicable law or agreed to in writing,
10+
* software distributed under the Apache License Version 2.0 is distributed on an
11+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
13+
*/
114
package com.ning.http.client.providers.netty.handler;
215

316
import org.jboss.netty.handler.codec.http.HttpRequest;

src/main/java/com/ning/http/client/providers/netty/handler/Http1Point1ConnectionStrategy.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1+
/*
2+
* Copyright (c) 2014 AsyncHttpClient Project. All rights reserved.
3+
*
4+
* This program is licensed to you under the Apache License Version 2.0,
5+
* and you may not use this file except in compliance with the Apache License Version 2.0.
6+
* You may obtain a copy of the Apache License Version 2.0 at
7+
* http://www.apache.org/licenses/LICENSE-2.0.
8+
*
9+
* Unless required by applicable law or agreed to in writing,
10+
* software distributed under the Apache License Version 2.0 is distributed on an
11+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
13+
*/
114
package com.ning.http.client.providers.netty.handler;
215

316
import org.jboss.netty.handler.codec.http.HttpHeaders;
417
import org.jboss.netty.handler.codec.http.HttpMessage;
518
import org.jboss.netty.handler.codec.http.HttpRequest;
619
import org.jboss.netty.handler.codec.http.HttpResponse;
720

21+
/**
22+
* Connection strategy implementing standard HTTP 1.1 behaviour.
23+
*/
824
public class Http1Point1ConnectionStrategy implements ConnectionStrategy {
925

26+
/**
27+
* Implemented in accordance with RFC 7230 section 6.1
28+
* https://tools.ietf.org/html/rfc7230#section-6.1
29+
*/
1030
@Override
1131
public boolean keepAlive(HttpRequest httpRequest, HttpResponse response) {
1232
return isConnectionKeepAlive(httpRequest) && isConnectionKeepAlive(response);

0 commit comments

Comments
 (0)