From 51974b2ad6d23695500e28967331d044b2ced370 Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Tue, 21 Jan 2025 15:21:26 +0100 Subject: [PATCH] Working mix [Netty/NOTICE.md] Signed-off-by: Maxim Nesen --- .../JerseyExpectContinueHandler.java | 4 + .../netty/connector/NettyConnector.java | 7 +- .../src/main/resources/META-INF/NOTICE.md | 53 +++++++++ core-common/pom.xml | 70 ++++++++++++ .../META-INF/{NOTICE.markdown => NOTICE.md} | 104 ++++++++++-------- .../META-INF/{NOTICE.markdown => NOTICE.md} | 90 +++++++-------- 6 files changed, 237 insertions(+), 91 deletions(-) create mode 100644 core-client/src/main/resources/META-INF/NOTICE.md rename core-common/src/main/resources/META-INF/{NOTICE.markdown => NOTICE.md} (64%) rename core-server/src/main/resources/META-INF/{NOTICE.markdown => NOTICE.md} (97%) diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyExpectContinueHandler.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyExpectContinueHandler.java index 390bddf81f..6000cf1c25 100644 --- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyExpectContinueHandler.java +++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyExpectContinueHandler.java @@ -57,6 +57,9 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception ctx.fireChannelRead(msg); //bypass the message to the next handler in line } else { ctx.pipeline().remove(JerseyExpectContinueHandler.class); + ctx.pipeline().fireChannelActive(); + System.out.println("Chanel is active after 100-Continue received"); + ctx.pipeline().flush(); } } else { if (!isExpected) { @@ -118,6 +121,7 @@ private void processExpectationStatus(HttpResponseStatus status) throw new ProcessingException(LocalizationMessages .UNEXPECTED_VALUE_FOR_EXPECT_100_CONTINUE_STATUSES(status.code()), null); } + isExpected = false; } boolean isExpected() { diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java index 671e72a94f..568dac4b46 100644 --- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java +++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java @@ -456,6 +456,8 @@ public void operationComplete(io.netty.util.concurrent.Future futu } } + System.out.println("Step after 100-Continue processing"); + final CountDownLatch headersSet = new CountDownLatch(1); final CountDownLatch contentLengthSet = new CountDownLatch(1); @@ -491,11 +493,12 @@ public void run() { }); headersSet.await(); - if (!expect100ContinueHandler.isExpected()) { +// if (!expect100ContinueHandler.isExpected()) { // Send the HTTP request. Expect:100-continue processing is not applicable // in this case. + System.out.println("Another step after 100-Continue processing"); entityWriter.writeAndFlush(nettyRequest); - } +// } if (HttpUtil.isTransferEncodingChunked(nettyRequest)) { entityWriter.write(new HttpChunkedInput(entityWriter.getChunkedInput())); diff --git a/core-client/src/main/resources/META-INF/NOTICE.md b/core-client/src/main/resources/META-INF/NOTICE.md new file mode 100644 index 0000000000..c63044cf58 --- /dev/null +++ b/core-client/src/main/resources/META-INF/NOTICE.md @@ -0,0 +1,53 @@ +# Notice for Jersey Core Client module +This content is produced and maintained by the Eclipse Jersey project. + + +* https://projects.eclipse.org/projects/ee4j.jersey + +## Trademarks +Eclipse Jersey is a trademark of the Eclipse Foundation. + +## Copyright + +All content is the property of the respective authors or their employers. For +more information regarding authorship of content, please consult the listed +source code repository logs. + +## Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the Eclipse Public License v. 2.0 which is available at +http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made +available under the following Secondary Licenses when the conditions for such +availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU +General Public License, version 2 with the GNU Classpath Exception which is +available at https://www.gnu.org/software/classpath/license.html. + +SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +## Source Code +The project maintains the following source code repositories: + +* https://github.com/eclipse-ee4j/jersey + +## Third-party Content + +org.glassfish.hk2.external:jakarta.inject +* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved. +* Eclipse Public License 2.0 + GPL v.2 with CPE + +org.glassfish.hk2:osgi-resource-locator +* Copyright (c) 2009,2018 Oracle and/or its affiliates. All rights reserved. +* Eclipse Public License 2.0 + GPL v.2 with CPE + +jakarta.annotation:jakarta.annotation-api +* Copyright (c) 2005,2022 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2019, 2021 Eclipse Foundation. All rights reserved. +* Eclipse Public License 2.0 + GPL v.2 with CPE + +jakarta.ws.rs:jakarta.ws.rs-api +* Copyright (c) 2010,2021 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2018 Markus KARG. All rights reserved. +* Copyright (c) 2006 Google Inc. +* Eclipse Public License 2.0 + GPL v.2 with CPE + diff --git a/core-common/pom.xml b/core-common/pom.xml index 1baee22673..06de32a114 100644 --- a/core-common/pom.xml +++ b/core-common/pom.xml @@ -203,6 +203,76 @@ 1 + + org.apache.maven.plugins + maven-resources-plugin + ${resources.mvn.plugin.version} + true + false + + + + + copy-legaldocs + + copy-resources + + process-sources + + ${project.build.outputDirectory} + + + ${legal.source.folder} + META-INF/ + + LICENSE.md + + + + + + + + copy-legaldocs-to-sources + + copy-resources + + process-sources + + ${project.build.directory}/generated-sources/rsrc-gen + + + ${legal.source.folder} + META-INF/ + + LICENSE.md + + + + + + + + copy-legaldocs-to-osgi-bundles + + copy-resources + + process-sources + + ${project.build.directory}/legal + + + ${legal.source.folder} + META-INF/ + + LICENSE.md + + + + + + + diff --git a/core-common/src/main/resources/META-INF/NOTICE.markdown b/core-common/src/main/resources/META-INF/NOTICE.md similarity index 64% rename from core-common/src/main/resources/META-INF/NOTICE.markdown rename to core-common/src/main/resources/META-INF/NOTICE.md index 9b0a754cc3..da6372a8ca 100644 --- a/core-common/src/main/resources/META-INF/NOTICE.markdown +++ b/core-common/src/main/resources/META-INF/NOTICE.md @@ -1,44 +1,60 @@ -# Notice for Jersey Core Common module -This content is produced and maintained by the Eclipse Jersey project. - - -* https://projects.eclipse.org/projects/ee4j.jersey - -## Trademarks -Eclipse Jersey is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Public License v. 2.0 which is available at -http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made -available under the following Secondary Licenses when the conditions for such -availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU -General Public License, version 2 with the GNU Classpath Exception which is -available at https://www.gnu.org/software/classpath/license.html. - -SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - -## Source Code -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jersey - -## Third-party Content - -Google Guava Version 18.0 -* License: Apache License, 2.0 -* Copyright: (C) 2009 The Guava Authors - -JSR-166 Extension - JEP 266 -* License: Creative Commons 1.0 (CC0) -* No copyright -* Written by Doug Lea with assistance from members of JCP JSR-166 -* Expert Group and released to the public domain, as explained at -* http://creativecommons.org/publicdomain/zero/1.0/ +# Notice for Jersey Core Common module +This content is produced and maintained by the Eclipse Jersey project. + + +* https://projects.eclipse.org/projects/ee4j.jersey + +## Trademarks +Eclipse Jersey is a trademark of the Eclipse Foundation. + +## Copyright + +All content is the property of the respective authors or their employers. For +more information regarding authorship of content, please consult the listed +source code repository logs. + +## Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the Eclipse Public License v. 2.0 which is available at +http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made +available under the following Secondary Licenses when the conditions for such +availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU +General Public License, version 2 with the GNU Classpath Exception which is +available at https://www.gnu.org/software/classpath/license.html. + +SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +## Source Code +The project maintains the following source code repositories: + +* https://github.com/eclipse-ee4j/jersey + +## Third-party Content + +JSR-166 Extension - JEP 266 +* License: Creative Commons 1.0 (CC0) +* No copyright +* Written by Doug Lea with assistance from members of JCP JSR-166 +* Expert Group and released to the public domain, as explained at +* http://creativecommons.org/publicdomain/zero/1.0/ + +org.glassfish.hk2.external:jakarta.inject +* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved. +* Eclipse Public License 2.0 + GPL v.2 with CPE + +org.glassfish.hk2:osgi-resource-locator +* Copyright (c) 2009,2018 Oracle and/or its affiliates. All rights reserved. +* Eclipse Public License 2.0 + GPL v.2 with CPE + +jakarta.annotation:jakarta.annotation-api +* Copyright (c) 2005,2022 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2019, 2021 Eclipse Foundation. All rights reserved. +* Eclipse Public License 2.0 + GPL v.2 with CPE + +jakarta.ws.rs:jakarta.ws.rs-api +* Copyright (c) 2010,2021 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2018 Markus KARG. All rights reserved. +* Copyright (c) 2006 Google Inc. +* Eclipse Public License 2.0 + GPL v.2 with CPE + diff --git a/core-server/src/main/resources/META-INF/NOTICE.markdown b/core-server/src/main/resources/META-INF/NOTICE.md similarity index 97% rename from core-server/src/main/resources/META-INF/NOTICE.markdown rename to core-server/src/main/resources/META-INF/NOTICE.md index 2016cb4dde..69795c82ed 100644 --- a/core-server/src/main/resources/META-INF/NOTICE.markdown +++ b/core-server/src/main/resources/META-INF/NOTICE.md @@ -1,45 +1,45 @@ -# Notice for Jersey Core Server module -This content is produced and maintained by the Eclipse Jersey project. - -* https://projects.eclipse.org/projects/ee4j.jersey - -## Trademarks -Eclipse Jersey is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Public License v. 2.0 which is available at -http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made -available under the following Secondary Licenses when the conditions for such -availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU -General Public License, version 2 with the GNU Classpath Exception which is -available at https://www.gnu.org/software/classpath/license.html. - -SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - -## Source Code -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jersey - -## Third-party Content - -org.glassfish.jersey.server.internal.monitoring.core -* License: Apache License, 2.0 -* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved. -* Copyright 2010-2013 Coda Hale and Yammer, Inc. - -org.objectweb.asm Version 9.7.1 -* License: Modified BSD (https://asm.ow2.io/license.html) -* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved. - -W3.org documents -* License: W3C License -* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ +# Notice for Jersey Core Server module +This content is produced and maintained by the Eclipse Jersey project. + +* https://projects.eclipse.org/projects/ee4j.jersey + +## Trademarks +Eclipse Jersey is a trademark of the Eclipse Foundation. + +## Copyright + +All content is the property of the respective authors or their employers. For +more information regarding authorship of content, please consult the listed +source code repository logs. + +## Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the Eclipse Public License v. 2.0 which is available at +http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made +available under the following Secondary Licenses when the conditions for such +availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU +General Public License, version 2 with the GNU Classpath Exception which is +available at https://www.gnu.org/software/classpath/license.html. + +SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +## Source Code +The project maintains the following source code repositories: + +* https://github.com/eclipse-ee4j/jersey + +## Third-party Content + +org.glassfish.jersey.server.internal.monitoring.core +* License: Apache License, 2.0 +* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved. +* Copyright 2010-2013 Coda Hale and Yammer, Inc. + +org.objectweb.asm Version 9.7.1 +* License: Modified BSD (https://asm.ow2.io/license.html) +* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved. + +W3.org documents +* License: W3C License +* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/