Skip to content

Commit e738083

Browse files
committed
2 parents e35e72a + 6a19bcc commit e738083

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

README.markdown

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Implemented WebSocket protocol versions are:
2020

2121

2222
## Build
23-
You can build using Ant, Maven or Leiningen but there is nothing against just putting the source path ```src/main/java ``` on your applications buildpath.
23+
You can build using Ant, Maven, Gradle or Leiningen but there is nothing against just putting the source path ```src/main/java ``` on your applications buildpath.
2424

2525
### Ant
2626

@@ -43,16 +43,27 @@ To use maven add this repository to your pom.xml:
4343
Also add this dependency to your pom.xml:
4444
```xml
4545
<dependency>
46-
<groupId>org.java-websocket</groupId>
47-
<artifactId>Java-WebSocket</artifactId>
48-
<version>1.3.0</version>
49-
</dependency>
46+
<groupId>org.java-websocket</groupId>
47+
<artifactId>java-websocket</artifactId>
48+
<version>1.3.2</version>
49+
</dependency>
5050
```
5151

52+
### Gradle
53+
To use Gradle add this repository to your repositories list :
54+
```xml
55+
maven { url "http://clojars.org/repo" }
56+
```
57+
Then you can just add the latest version to your build.
58+
```xml
59+
compile "org.java-websocket:java-websocket:1.3.2"
60+
```
61+
62+
5263
### Leiningen
5364

5465
``` bash
55-
lein compile
66+
[org.java-websocket/java-websocket "1.3.2"]
5667
```
5768

5869
Running the Examples

src/main/java/org/java_websocket/drafts/Draft_76.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public HandshakeState acceptHandshakeAsClient( ClientHandshake request, ServerHa
130130

131131
@Override
132132
public HandshakeState acceptHandshakeAsServer( ClientHandshake handshakedata ) {
133-
if( handshakedata.getFieldValue( "Upgrade" ).equals( "WebSocket" ) && handshakedata.getFieldValue( "Connection" ).contains( "Upgrade" ) && handshakedata.getFieldValue( "Sec-WebSocket-Key1" ).length() > 0 && !handshakedata.getFieldValue( "Sec-WebSocket-Key2" ).isEmpty() && handshakedata.hasFieldValue( "Origin" ) )
133+
if( handshakedata.getFieldValue( "Upgrade" ).equals( "WebSocket" ) && handshakedata.getFieldValue( "Connection" ).contains( "Upgrade" ) && handshakedata.getFieldValue( "Sec-WebSocket-Key1" ).length() > 0 && handshakedata.getFieldValue( "Sec-WebSocket-Key2" ).length() > 0 && handshakedata.hasFieldValue( "Origin" ) )
134134
return HandshakeState.MATCHED;
135135
return HandshakeState.NOT_MATCHED;
136136
}

0 commit comments

Comments
 (0)