Skip to content

Commit

Permalink
IDEMPIERE-3136:all stuff relate library of idempiere
Browse files Browse the repository at this point in the history
update jetty to 9.3.10
work-around for:
jetty/jetty.project#262
jetty/jetty.project#704
  • Loading branch information
hieplq committed Jul 8, 2016
1 parent 869657f commit 8ae3345
Show file tree
Hide file tree
Showing 59 changed files with 14,234 additions and 2 deletions.
1 change: 1 addition & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax: glob
build

External Plug-in Libraries
org.eclipse.jetty.http/bin
syntax: regexp
^adempiere$
^org\.adempiere\.install/lib$
Expand Down
9 changes: 9 additions & 0 deletions org.adempiere.sdk-feature/adempiere.rmap
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<rm:rmap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns:maven="http://www.eclipse.org/buckminster/MavenProvider-1.0" xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0">
<rm:locator pattern="^org\.eclipse\.jetty\.http$" searchPathRef="workspace.project"/>
<rm:locator pattern="^org\.eclipse\.jetty\.alpn\.api$" searchPathRef="modify-bundle"/>
<rm:locator pattern="^org\.apache\.felix\.webconsole\.plugins\.packageadmin$" searchPathRef="bundles.maven"/>
<rm:locator pattern="^org\.idempiere\.hazelcast\.service$" searchPathRef="workspace.feature" failOnError="false"/>
<rm:locator pattern="^org\.idempiere\.hazelcast\.service$" searchPathRef="workspace.project"/>
Expand Down Expand Up @@ -171,4 +173,11 @@
<rm:uri format="${url.zkoss.osgi}"/>
</rm:provider>
</rm:searchPath>
<rm:searchPath name="modify-bundle">
<rm:provider componentTypes="osgi.bundle" readerType="p2" source="false" mutable="false">
<rm:property key="buckminster.source" value="false"/>
<rm:property key="buckminster.mutable" value="false"/>
<rm:uri format="${url.modify.bundle}"/>
</rm:provider>
</rm:searchPath>
</rm:rmap>
2 changes: 2 additions & 0 deletions org.adempiere.sdk-feature/materialize.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ url.orbit.neon=http://download.eclipse.org/tools/orbit/downloads/drops/R20160520
url.file.srv=http://downloads.sourceforge.net/project/idempiere/binary.file

url.restlet.p2=http://p2.restlet.com/2.3

url.modify.bundle=http://downloads.sourceforge.net/project/idempiere/p2/modifyBundle-1.0.0
4 changes: 2 additions & 2 deletions org.adempiere.server-feature/server.product.launch

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions org.eclipse.jetty.http/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
33 changes: 33 additions & 0 deletions org.eclipse.jetty.http/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.jetty.http</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
35 changes: 35 additions & 0 deletions org.eclipse.jetty.http/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven Bundle Plugin
Built-By: joakim
Build-Jdk: 1.8.0_65
Implementation-Vendor: Eclipse.org - Jetty
Implementation-Version: 9.3.10.v20160621
url: http://www.eclipse.org/jetty
Bnd-LastModified: 1457969504223
Bundle-Classpath: .
Bundle-Copyright: Copyright (c) 2008-2016 Mort Bay Consulting Pty. Ltd.
Bundle-Description: Jetty module for Jetty :: Http Utility
Bundle-DocURL: http://www.eclipse.org/jetty
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0, http://www
.eclipse.org/org/documents/epl-v10.php
Bundle-ManifestVersion: 2
Bundle-Name: Jetty :: Http Utility
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-SymbolicName: org.eclipse.jetty.http
Bundle-Vendor: Eclipse Jetty Project
Bundle-Version: 9.3.10.v20160621
Export-Package: org.eclipse.jetty.http;version="9.3.10";uses:="org.ecl
ipse.jetty.util,org.eclipse.jetty.util.log,org.eclipse.jetty.util.res
ource",org.eclipse.jetty.http.pathmap;version="9.3.10";uses:="org.ecl
ipse.jetty.util.annotation,org.eclipse.jetty.util.component",org.ecli
pse.jetty.http2.hpack;version="9.3.10";uses:="org.eclipse.jetty.http,
org.eclipse.jetty.util.log"
Import-Package: org.eclipse.jetty.util;version="[9.3.10,9.3.11)",org.e
clipse.jetty.util.annotation;version="[9.3.10,9.3.11)",org.eclipse.je
tty.util.component;version="[9.3.10,9.3.11)",org.eclipse.jetty.util.l
og;version="[9.3.10,9.3.11)",org.eclipse.jetty.util.resource;version=
"[9.3.10,9.3.11)"
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Tool: Bnd-2.4.1.201501161923

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
org.eclipse.jetty.http.Http1FieldPreEncoder
org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder
27 changes: 27 additions & 0 deletions org.eclipse.jetty.http/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>19 May, 2009</p>
<h3>License</h3>

<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). The Content is dual licensed and is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 (&quot;EPL&quot;) as well as the Apache Software License Version 2.0. A copy of the EPL is available
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. A copy of the ASL is available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>. For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>

<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>

<p><b>jetty-util</b> artifact only:<br/><br/>The UnixCrypt.java code implements the one way cryptography used by
Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
modified April 2001 by Iris Van den Broeke, Daniel Deville.
Permission to use, copy, modify and distribute UnixCrypt
for non-commercial or commercial purposes and without fee is
granted provided that the copyright notice appears in all copies.</p>

</body>
</html>
4 changes: 4 additions & 0 deletions org.eclipse.jetty.http/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//
// ========================================================================
// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//

package org.eclipse.jetty.http;

/* ------------------------------------------------------------------------------- */
/**
* <p>Exception thrown to indicate a Bad HTTP Message has either been received
* or attempted to be generated. Typically these are handled with either 400
* or 500 responses.</p>
*/
@SuppressWarnings("serial")
public class BadMessageException extends RuntimeException
{
final int _code;
final String _reason;

public BadMessageException()
{
this(400,null);
}

public BadMessageException(int code)
{
this(code,null);
}

public BadMessageException(String reason)
{
this(400,reason);
}

public BadMessageException(int code, String reason)
{
super(code+": "+reason);
_code=code;
_reason=reason;
}

public BadMessageException(int code, String reason, Throwable cause)
{
super(code+": "+reason, cause);
_code=code;
_reason=reason;
}

public int getCode()
{
return _code;
}

public String getReason()
{
return _reason;
}
}
173 changes: 173 additions & 0 deletions org.eclipse.jetty.http/src/org/eclipse/jetty/http/DateGenerator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
//
// ========================================================================
// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//

package org.eclipse.jetty.http;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;

import org.eclipse.jetty.util.StringUtil;

/**
* ThreadLocal Date formatters for HTTP style dates.
*/
public class DateGenerator
{
private static final TimeZone __GMT = TimeZone.getTimeZone("GMT");
static
{
__GMT.setID("GMT");
}

static final String[] DAYS =
{ "Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
static final String[] MONTHS =
{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Jan"};


private static final ThreadLocal<DateGenerator> __dateGenerator =new ThreadLocal<DateGenerator>()
{
@Override
protected DateGenerator initialValue()
{
return new DateGenerator();
}
};


public final static String __01Jan1970=DateGenerator.formatDate(0);

/**
* Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'"
* @param date the date in milliseconds
* @return the formatted date
*/
public static String formatDate(long date)
{
return __dateGenerator.get().doFormatDate(date);
}

/**
* Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookies
* @param buf the buffer to put the formatted date into
* @param date the date in milliseconds
*/
public static void formatCookieDate(StringBuilder buf, long date)
{
__dateGenerator.get().doFormatCookieDate(buf,date);
}

/**
* Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookies
* @param date the date in milliseconds
* @return the formatted date
*/
public static String formatCookieDate(long date)
{
StringBuilder buf = new StringBuilder(28);
formatCookieDate(buf, date);
return buf.toString();
}

private final StringBuilder buf = new StringBuilder(32);
private final GregorianCalendar gc = new GregorianCalendar(__GMT);

/**
* Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'"
* @param date the date in milliseconds
* @return the formatted date
*/
public String doFormatDate(long date)
{
buf.setLength(0);
gc.setTimeInMillis(date);

int day_of_week = gc.get(Calendar.DAY_OF_WEEK);
int day_of_month = gc.get(Calendar.DAY_OF_MONTH);
int month = gc.get(Calendar.MONTH);
int year = gc.get(Calendar.YEAR);
int century = year / 100;
year = year % 100;

int hours = gc.get(Calendar.HOUR_OF_DAY);
int minutes = gc.get(Calendar.MINUTE);
int seconds = gc.get(Calendar.SECOND);

buf.append(DAYS[day_of_week]);
buf.append(',');
buf.append(' ');
StringUtil.append2digits(buf, day_of_month);

buf.append(' ');
buf.append(MONTHS[month]);
buf.append(' ');
StringUtil.append2digits(buf, century);
StringUtil.append2digits(buf, year);

buf.append(' ');
StringUtil.append2digits(buf, hours);
buf.append(':');
StringUtil.append2digits(buf, minutes);
buf.append(':');
StringUtil.append2digits(buf, seconds);
buf.append(" GMT");
return buf.toString();
}

/**
* Format "EEE, dd-MMM-yy HH:mm:ss 'GMT'" for cookies
* @param buf the buffer to format the date into
* @param date the date in milliseconds
*/
public void doFormatCookieDate(StringBuilder buf, long date)
{
gc.setTimeInMillis(date);

int day_of_week = gc.get(Calendar.DAY_OF_WEEK);
int day_of_month = gc.get(Calendar.DAY_OF_MONTH);
int month = gc.get(Calendar.MONTH);
int year = gc.get(Calendar.YEAR);
year = year % 10000;

int epoch = (int) ((date / 1000) % (60 * 60 * 24));
int seconds = epoch % 60;
epoch = epoch / 60;
int minutes = epoch % 60;
int hours = epoch / 60;

buf.append(DAYS[day_of_week]);
buf.append(',');
buf.append(' ');
StringUtil.append2digits(buf, day_of_month);

buf.append('-');
buf.append(MONTHS[month]);
buf.append('-');
StringUtil.append2digits(buf, year/100);
StringUtil.append2digits(buf, year%100);

buf.append(' ');
StringUtil.append2digits(buf, hours);
buf.append(':');
StringUtil.append2digits(buf, minutes);
buf.append(':');
StringUtil.append2digits(buf, seconds);
buf.append(" GMT");
}
}
Loading

0 comments on commit 8ae3345

Please sign in to comment.