Skip to content
Permalink
Browse files
Request message copy optimization
  • Loading branch information
ok2c committed Feb 6, 2021
1 parent 17fce41 commit e6a7fe8a0cc6c1f4324b6078435ab6578746f6cf
Showing 2 changed files with 6 additions and 6 deletions.
@@ -46,13 +46,13 @@ public HttpRequest copy(final HttpRequest original) {
if (original == null) {
return null;
}
final BasicHttpRequest copy = new BasicHttpRequest(original.getMethod(), original.getPath());
final BasicHttpRequest copy = new BasicHttpRequest(original.getMethod(), null, original.getPath());
copy.setScheme(original.getScheme());
copy.setAuthority(original.getAuthority());
copy.setVersion(original.getVersion());
for (final Iterator<Header> it = original.headerIterator(); it.hasNext(); ) {
copy.addHeader(it.next());
}
copy.setScheme(original.getScheme());
copy.setAuthority(original.getAuthority());
return copy;
}

@@ -47,13 +47,13 @@ public ClassicHttpRequest copy(final ClassicHttpRequest original) {
if (original == null) {
return null;
}
final BasicClassicHttpRequest copy = new BasicClassicHttpRequest(original.getMethod(), original.getPath());
final BasicClassicHttpRequest copy = new BasicClassicHttpRequest(original.getMethod(), null, original.getPath());
copy.setScheme(original.getScheme());
copy.setAuthority(original.getAuthority());
copy.setVersion(original.getVersion());
for (final Iterator<Header> it = original.headerIterator(); it.hasNext(); ) {
copy.addHeader(it.next());
}
copy.setScheme(original.getScheme());
copy.setAuthority(original.getAuthority());
copy.setEntity(original.getEntity());
return copy;
}

0 comments on commit e6a7fe8

Please sign in to comment.